From 486a30ffe72a745f7174d853bea20f06f50cfb2d Mon Sep 17 00:00:00 2001 From: Onno Visser <23527729+onnovisser@users.noreply.github.com> Date: Mon, 13 Jan 2025 12:26:50 +0100 Subject: [PATCH 01/42] add docs generation --- package.json | 5 +- src/Centrifuge.ts | 27 ++----- src/Entity.ts | 4 + src/Pool.ts | 5 +- src/PoolNetwork.ts | 4 +- src/Reports/Processor.ts | 47 ++++++------ src/Reports/index.ts | 41 ++++++----- src/Vault.ts | 1 + src/index.ts | 50 ++++++++++++- src/types/index.ts | 19 +++++ src/types/reports.ts | 15 ++-- src/utils/BigInt.ts | 6 ++ tsconfig.json | 3 +- typedoc-plugin.mjs | 47 ++++++++++++ typedoc.json | 3 + yarn.lock | 153 ++++++++++++++++++++++++++++++++++++++- 16 files changed, 349 insertions(+), 81 deletions(-) create mode 100644 typedoc-plugin.mjs create mode 100644 typedoc.json diff --git a/package.json b/package.json index 95a8aa5..8e1ee1d 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "test:simple:single": "mocha --loader=ts-node/esm --exit --timeout 60000", "test:single": "mocha --loader=ts-node/esm --require $(pwd)/src/tests/setup.ts --exit --timeout 60000", "test:ci": "yarn test --reporter mocha-multi-reporters --reporter-options configFile=mocha-reporter-config.json", - "test:coverage": "c8 yarn test:ci" + "test:coverage": "c8 yarn test:ci", + "gen:docs": "typedoc --out docs --skipErrorChecking --excludeExternals src/index.ts" }, "dependencies": { "decimal.js-light": "^2.5.1", @@ -61,6 +62,8 @@ "sinon-chai": "^4.0.0", "source-map-support": "^0.5.21", "ts-node": "^10.9.2", + "typedoc": "^0.27.6", + "typedoc-plugin-markdown": "^4.4.1", "typescript": "~5.6.3", "typescript-eslint": "^8.8.1", "viem": "^2.21.25" diff --git a/src/Centrifuge.ts b/src/Centrifuge.ts index 5363854..288ff6b 100644 --- a/src/Centrifuge.ts +++ b/src/Centrifuge.ts @@ -24,7 +24,6 @@ import { type Abi, type Account as AccountType, type Chain, - type PublicClient, type WalletClient, type WatchEventOnLogsParameter, } from 'viem' @@ -34,7 +33,7 @@ import { chains } from './config/chains.js' import type { CurrencyMetadata } from './config/lp.js' import { PERMIT_TYPEHASH } from './constants.js' import { Pool } from './Pool.js' -import type { HexString } from './types/index.js' +import type { Client, DerivedConfig, EnvConfig, HexString, UserProvidedConfig } from './types/index.js' import type { CentrifugeQueryOptions, Query } from './types/query.js' import type { OperationStatus, Signer, Transaction, TransactionCallbackParams } from './types/transaction.js' import { Currency } from './utils/BigInt.js' @@ -42,23 +41,6 @@ import { hashKey } from './utils/query.js' import { makeThenable, repeatOnEvents, shareReplayWithDelayedReset } from './utils/rx.js' import { doTransaction, isLocalAccount } from './utils/transaction.js' -export type Config = { - environment: 'mainnet' | 'demo' | 'dev' - rpcUrls?: Record - indexerUrl: string - ipfsUrl: string -} - -export type UserProvidedConfig = Partial -type EnvConfig = { - indexerUrl: string - alchemyKey: string - infuraKey: string - defaultChain: number - ipfsUrl: string -} -type DerivedConfig = Config & EnvConfig - const envConfig = { mainnet: { indexerUrl: 'https://subql.embrio.tech/', @@ -93,7 +75,7 @@ export class Centrifuge { return this.#config } - #clients = new Map>() + #clients = new Map() getClient(chainId?: number) { return this.#clients.get(chainId ?? this.config.defaultChain) } @@ -134,8 +116,8 @@ export class Centrifuge { }) } - pool(id: string, metadataHash?: string) { - return this._query(null, () => of(new Pool(this, id, metadataHash))) + pool(id: string | number, metadataHash?: string) { + return this._query(null, () => of(new Pool(this, String(id), metadataHash))) } account(address: string, chainId?: number) { @@ -535,6 +517,7 @@ export class Centrifuge { * // { type: 'SigningTransaction', title: 'Invest' } * // { type: 'TransactionPending', title: 'Invest', hash: '0x123...abc' } * // { type: 'TransactionConfirmed', title: 'Invest', hash: '0x123...abc', receipt: { ... } } + * ``` * * @internal */ diff --git a/src/Entity.ts b/src/Entity.ts index 5935a77..45da064 100644 --- a/src/Entity.ts +++ b/src/Entity.ts @@ -4,9 +4,12 @@ import type { CentrifugeQueryOptions } from './types/query.js' export class Entity { #baseKeys: (string | number)[] + /** @internal */ _transact: Centrifuge['_transact'] + /** @internal */ _transactSequence: Centrifuge['_transactSequence'] constructor( + /** @internal */ protected _root: Centrifuge, queryKeys: (string | number)[] ) { @@ -15,6 +18,7 @@ export class Entity { this._transactSequence = this._root._transactSequence.bind(this._root) } + /** @internal */ protected _query( keys: (string | number | undefined)[] | null, observableCallback: () => Observable, diff --git a/src/Pool.ts b/src/Pool.ts index c4536e8..f9122c5 100644 --- a/src/Pool.ts +++ b/src/Pool.ts @@ -6,6 +6,7 @@ import { Reports } from './Reports/index.js' import { PoolMetadata } from './types/poolMetadata.js' export class Pool extends Entity { + /** @internal */ constructor( _root: Centrifuge, public id: string, @@ -19,7 +20,9 @@ export class Pool extends Entity { } metadata() { - return this.metadataHash ? this._root._queryIPFS(this.metadataHash) : of(undefined) + return this.metadataHash + ? this._root._queryIPFS(this.metadataHash) + : this._query(null, () => of(null)) } trancheIds() { diff --git a/src/PoolNetwork.ts b/src/PoolNetwork.ts index 2ebedd8..31ce974 100644 --- a/src/PoolNetwork.ts +++ b/src/PoolNetwork.ts @@ -14,6 +14,7 @@ import { Vault } from './Vault.js' * Query and interact with a pool on a specific network. */ export class PoolNetwork extends Entity { + /** @internal */ constructor( _root: Centrifuge, public pool: Pool, @@ -192,9 +193,10 @@ export class PoolNetwork extends Entity { /** * Get all Vaults for all tranches in the pool. + * @returns An object of tranche ID to Vault. */ vaultsByTranche() { - return this._query(null, () => + return this._query>(null, () => this.pool.trancheIds().pipe( switchMap((tranches) => { return combineLatest(tranches.map((trancheId) => this.vaults(trancheId))).pipe( diff --git a/src/Reports/Processor.ts b/src/Reports/Processor.ts index 85984e7..1ac765f 100644 --- a/src/Reports/Processor.ts +++ b/src/Reports/Processor.ts @@ -1,37 +1,37 @@ import { AssetTransaction } from '../IndexerQueries/assetTransactions.js' import { InvestorTransaction } from '../IndexerQueries/investorTransactions.js' -import { Currency, Price, Rate, Token } from '../utils/BigInt.js' -import { groupByPeriod } from '../utils/date.js' +import { PoolFeeTransaction } from '../IndexerQueries/poolFeeTransactions.js' import { + AssetListData, + AssetListReport, + AssetListReportFilter, + AssetListReportPrivateCredit, + AssetListReportPublicCredit, + AssetTransactionReport, + AssetTransactionReportFilter, + AssetTransactionsData, BalanceSheetData, BalanceSheetReport, CashflowData, CashflowReport, - ProfitAndLossReport, - ProfitAndLossData, - ReportFilter, + FeeTransactionReport, + FeeTransactionReportFilter, + FeeTransactionsData, + InvestorListData, + InvestorListReport, + InvestorListReportFilter, InvestorTransactionsData, InvestorTransactionsReport, InvestorTransactionsReportFilter, - AssetTransactionReport, - AssetTransactionsData, - AssetTransactionReportFilter, - FeeTransactionsData, - FeeTransactionReportFilter, - FeeTransactionReport, + ProfitAndLossData, + ProfitAndLossReport, + ReportFilter, + TokenPriceData, TokenPriceReport, TokenPriceReportFilter, - TokenPriceData, - AssetListReport, - AssetListReportFilter, - AssetListData, - AssetListReportPublicCredit, - AssetListReportPrivateCredit, - InvestorListData, - InvestorListReportFilter, - InvestorListReport, } from '../types/reports.js' -import { PoolFeeTransaction } from '../IndexerQueries/poolFeeTransactions.js' +import { Currency, Price, Rate, Token } from '../utils/BigInt.js' +import { groupByPeriod } from '../utils/date.js' export class Processor { /** @@ -299,7 +299,7 @@ export class Processor { if (Object.values(data.trancheSnapshots).length === 0) return [] const items = Object.entries(data.trancheSnapshots).map(([timestamp, snapshots]) => ({ type: 'tokenPrice' as const, - timestamp: timestamp, + timestamp, tranches: snapshots.map((snapshot) => ({ timestamp: snapshot.timestamp, id: snapshot.trancheId, @@ -327,7 +327,8 @@ export class Processor { return isMaturityDatePassed && isDebtZero } else if (filter?.status === 'overdue') { return isMaturityDatePassed && !isDebtZero - } else return true + } + return true }) .sort((a, b) => { // Sort by actualMaturityDate in descending order diff --git a/src/Reports/index.ts b/src/Reports/index.ts index bbd8b28..4c0e092 100644 --- a/src/Reports/index.ts +++ b/src/Reports/index.ts @@ -1,33 +1,31 @@ -import { Entity } from '../Entity.js' +import { combineLatest, map } from 'rxjs' import { Centrifuge } from '../Centrifuge.js' -import { combineLatest } from 'rxjs' -import { processor } from './Processor.js' - -import { map } from 'rxjs' +import { Entity } from '../Entity.js' +import { IndexerQueries } from '../IndexerQueries/index.js' +import { Pool } from '../Pool.js' +import { Query } from '../types/query.js' import { + AssetListReport, + AssetListReportFilter, + AssetTransactionReport, + AssetTransactionReportFilter, BalanceSheetReport, CashflowReport, - InvestorTransactionsReport, - ProfitAndLossReport, - ReportFilter, - Report, DataReport, DataReportFilter, - InvestorTransactionsReportFilter, - AssetTransactionReport, - AssetTransactionReportFilter, - TokenPriceReport, - TokenPriceReportFilter, FeeTransactionReport, FeeTransactionReportFilter, - AssetListReportFilter, - AssetListReport, - InvestorListReportFilter, InvestorListReport, + InvestorListReportFilter, + InvestorTransactionsReport, + InvestorTransactionsReportFilter, + ProfitAndLossReport, + Report, + ReportFilter, + TokenPriceReport, + TokenPriceReportFilter, } from '../types/reports.js' -import { Query } from '../types/query.js' -import { Pool } from '../Pool.js' -import { IndexerQueries } from '../IndexerQueries/index.js' +import { processor } from './Processor.js' const DEFAULT_FILTER: ReportFilter = { from: '2024-01-01T00:00:00.000Z', @@ -35,6 +33,7 @@ const DEFAULT_FILTER: ReportFilter = { } export class Reports extends Entity { private queries: IndexerQueries + /** @internal */ constructor( centrifuge: Centrifuge, public pool: Pool @@ -83,6 +82,8 @@ export class Reports extends Entity { * Reports are split into two types: * - A `Report` is a standard report: balanceSheet, cashflow, profitAndLoss * - A `DataReport` is a custom report: investorTransactions, assetTransactions, feeTransactions, tokenPrice, assetList, investorList + * + * @internal */ _generateReport(type: Report, filter?: ReportFilter): Query _generateReport(type: DataReport, filter?: DataReportFilter): Query diff --git a/src/Vault.ts b/src/Vault.ts index 4e2057a..93af418 100644 --- a/src/Vault.ts +++ b/src/Vault.ts @@ -28,6 +28,7 @@ export class Vault extends Entity { * The contract address of the vault. */ address: HexString + /** @internal */ constructor( _root: Centrifuge, public network: PoolNetwork, diff --git a/src/index.ts b/src/index.ts index 4046ac3..7e7462f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,53 @@ import { Centrifuge } from './Centrifuge.js' +export type { CurrencyMetadata } from './config/lp.js' export * from './Pool.js' export * from './PoolNetwork.js' -export * from './types/index.js' -export * from './types/query.js' -export * from './types/transaction.js' +export * from './Reports/index.js' +export type { Client, Config, HexString } from './types/index.js' +export type { Query } from './types/query.js' +export type { + AssetListReport, + AssetListReportBase, + AssetListReportFilter, + AssetListReportPrivateCredit, + AssetListReportPublicCredit, + AssetTransactionReport, + AssetTransactionReportFilter, + BalanceSheetReport, + CashflowReport, + CashflowReportBase, + CashflowReportPrivateCredit, + CashflowReportPublicCredit, + FeeTransactionReport, + FeeTransactionReportFilter, + InvestorListReport, + InvestorListReportFilter, + InvestorTransactionsReport, + InvestorTransactionsReportFilter, + ProfitAndLossReport, + ProfitAndLossReportBase, + ProfitAndLossReportPrivateCredit, + ProfitAndLossReportPublicCredit, + ReportFilter, + TokenPriceReport, + TokenPriceReportFilter, +} from './types/reports.js' +export type { + EIP1193ProviderLike, + OperationConfirmedStatus, + OperationPendingStatus, + OperationSignedMessageStatus, + OperationSigningMessageStatus, + OperationSigningStatus, + OperationStatus, + OperationStatusType, + OperationSwitchChainStatus, + Signer, + Transaction, +} from './types/transaction.js' +export { Currency, Perquintill, Price, Rate } from './utils/BigInt.js' +export type { GroupBy } from './utils/date.js' export * from './Vault.js' +export { Centrifuge } export default Centrifuge diff --git a/src/types/index.ts b/src/types/index.ts index e658391..a83d096 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1 +1,20 @@ +import { Chain, PublicClient } from 'viem' + +export type Config = { + environment: 'mainnet' | 'demo' | 'dev' + rpcUrls?: Record + indexerUrl: string + ipfsUrl: string +} + +export type UserProvidedConfig = Partial +export type EnvConfig = { + indexerUrl: string + alchemyKey: string + infuraKey: string + defaultChain: number + ipfsUrl: string +} +export type DerivedConfig = Config & EnvConfig +export type Client = PublicClient export type HexString = `0x${string}` diff --git a/src/types/reports.ts b/src/types/reports.ts index 9601c21..c2a359a 100644 --- a/src/types/reports.ts +++ b/src/types/reports.ts @@ -7,8 +7,7 @@ import { PoolSnapshot } from '../IndexerQueries/poolSnapshots.js' import { TrancheCurrencyBalance } from '../IndexerQueries/trancheCurrencyBalance.js' import { TrancheSnapshotsByDate } from '../IndexerQueries/trancheSnapshots.js' import { PoolMetadata } from '../types/poolMetadata.js' -import { Price, Rate, Token } from '../utils/BigInt.js' -import { Currency } from '../utils/BigInt.js' +import { Currency, Price, Rate, Token } from '../utils/BigInt.js' import { GroupBy } from '../utils/date.js' export interface ReportFilter { @@ -61,7 +60,7 @@ export type BalanceSheetData = { /** * Cashflow types */ -type CashflowReportBase = { +export type CashflowReportBase = { type: 'cashflow' timestamp: string principalPayments: Currency @@ -76,13 +75,13 @@ type CashflowReportBase = { endCashBalance: { balance: Currency } } -type CashflowReportPublicCredit = CashflowReportBase & { +export type CashflowReportPublicCredit = CashflowReportBase & { subtype: 'publicCredit' realizedPL?: Currency assetPurchases?: Currency } -type CashflowReportPrivateCredit = CashflowReportBase & { +export type CashflowReportPrivateCredit = CashflowReportBase & { subtype: 'privateCredit' assetFinancing?: Currency } @@ -92,7 +91,7 @@ export type CashflowReport = CashflowReportPublicCredit | CashflowReportPrivateC export type CashflowData = { poolSnapshots: PoolSnapshot[] poolFeeSnapshots: PoolFeeSnapshotsByDate - metadata: PoolMetadata | undefined + metadata: PoolMetadata | undefined | null } /** @@ -125,7 +124,7 @@ export type ProfitAndLossReport = ProfitAndLossReportPublicCredit | ProfitAndLos export type ProfitAndLossData = { poolSnapshots: PoolSnapshot[] poolFeeSnapshots: PoolFeeSnapshotsByDate - metadata: PoolMetadata | undefined + metadata: PoolMetadata | undefined | null } /** @@ -226,7 +225,7 @@ export type TokenPriceReportFilter = { */ export type AssetListData = { assetSnapshots: AssetSnapshot[] - metadata: PoolMetadata | undefined + metadata: PoolMetadata | undefined | null } export type AssetListReportBase = { diff --git a/src/utils/BigInt.ts b/src/utils/BigInt.ts index 58920f0..efd17eb 100644 --- a/src/utils/BigInt.ts +++ b/src/utils/BigInt.ts @@ -31,6 +31,7 @@ export class DecimalWrapper extends BigIntWrapper { this.decimals = decimals } + /** @internal */ static _fromFloat(num: Numeric, decimals: number) { const n = Dec(num.toString()).mul(Dec(10).pow(decimals)) if (Dec(n).gt(0) && Dec(n).lt(1)) { @@ -47,11 +48,13 @@ export class DecimalWrapper extends BigIntWrapper { return this.toDecimal().toNumber() } + /** @internal */ _add(value: bigint | (T extends DecimalWrapper ? T : never)): T { const val = typeof value === 'bigint' ? value : value.toBigInt() return new (this.constructor as any)(this.value + val, this.decimals) } + /** @internal */ _sub(value: bigint | (T extends DecimalWrapper ? T : never)): T { const val = typeof value === 'bigint' ? value : value.toBigInt() return this._add(-val) @@ -63,6 +66,8 @@ export class DecimalWrapper extends BigIntWrapper { * Currency.fromFloat(1, 6).mul(Price.fromFloat(1.01)) * // Price has 18 decimals * // returns Currency with 6 decimals (1_010_000n or 1.01) + * + * @internal */ _mul(value: bigint | (T extends DecimalWrapper ? T : never)): T { let val: any @@ -76,6 +81,7 @@ export class DecimalWrapper extends BigIntWrapper { return new (this.constructor as any)(this.toDecimal().mul(val), this.decimals) as T } + /** @internal */ _div(value: bigint | (T extends BigIntWrapper ? T : never)): T { if (!value) { throw new Error(`Division by zero`) diff --git a/tsconfig.json b/tsconfig.json index 22e2a14..7be37d5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,8 @@ "noImplicitOverride": true, "lib": ["es2023", "dom", "dom.iterable"], "outDir": "dist", - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "stripInternal": true }, "include": ["src", "src/**/*.d.ts"], "exclude": ["**/*.test.ts"] diff --git a/typedoc-plugin.mjs b/typedoc-plugin.mjs new file mode 100644 index 0000000..fdd0abc --- /dev/null +++ b/typedoc-plugin.mjs @@ -0,0 +1,47 @@ +// @ts-check +import url from 'node:url' +import { MarkdownPageEvent } from 'typedoc-plugin-markdown' + +/** + * @param {import('typedoc-plugin-markdown').MarkdownApplication} app + */ +export function load(app) { + app.renderer.on(MarkdownPageEvent.END, (page) => { + page.contents = page.contents + // Remove the noise before the first heading + ?.replace(/(^.*?)(?=\n?#\s)/s, '') + // Remove generic type parameters from headings + .replace(/^(# .*)(\\<.*?>)/m, (_, heading) => heading.replace(/\\<.*?>/, '').trim()) + .replace('# Type Alias', '# Type') + // Increase the heading levels by one + .replaceAll('# ', '## ') + page.filename = page.filename?.replace(/\/([^\/]+)$/, '/_$1') + page.contents = rewriteMarkdownLinks(page.contents ?? '', page.url) + }) + app.renderer.postRenderAsyncJobs.push(async (renderer) => { + // Log the paths in a way that can be easily used with Slate + console.log(renderer.urls?.map((u) => u.url.replace(/\.md$/, '')).join('\n')) + }) +} + +/** + * @param {string} markdownContent + * @param {string} pageUrl + */ +function rewriteMarkdownLinks(markdownContent, pageUrl) { + const linkRegex = /\[([^\]]+)\]\(([^)]+\.md)\)/g + const markdown = markdownContent.replace(linkRegex, (_, linkName, relativePath) => { + const resolvedUrl = url + .resolve(pageUrl, relativePath) + .replace(/\.md$/, '') + .replace(/:/, '') + .replace(/[\s\/]/, '-') + .replace(/^classes/, 'class') + .replace(/^type-aliases/, 'type') + .toLowerCase() + + return `[${linkName}](#${resolvedUrl})` + }) + + return markdown +} diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..ecb978b --- /dev/null +++ b/typedoc.json @@ -0,0 +1,3 @@ +{ + "plugin": ["typedoc-plugin-markdown", "./typedoc-plugin.mjs"] +} diff --git a/yarn.lock b/yarn.lock index 1df25ed..51f62af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -46,6 +46,8 @@ __metadata: sinon-chai: "npm:^4.0.0" source-map-support: "npm:^0.5.21" ts-node: "npm:^10.9.2" + typedoc: "npm:^0.27.6" + typedoc-plugin-markdown: "npm:^4.4.1" typescript: "npm:~5.6.3" typescript-eslint: "npm:^8.8.1" viem: "npm:^2.21.25" @@ -139,6 +141,17 @@ __metadata: languageName: node linkType: hard +"@gerrit0/mini-shiki@npm:^1.24.0": + version: 1.26.1 + resolution: "@gerrit0/mini-shiki@npm:1.26.1" + dependencies: + "@shikijs/engine-oniguruma": "npm:^1.26.1" + "@shikijs/types": "npm:^1.26.1" + "@shikijs/vscode-textmate": "npm:^10.0.1" + checksum: 10c0/044ff495b39105c63e0a8fdd9f46891761a89019e318ffc472a0bd25e632f8593b158efb24a00e6654d8021c7ffd4e8dbbdfe96823da85360e66ebe45e4b8538 + languageName: node + linkType: hard + "@humanfs/core@npm:^0.19.1": version: 0.19.1 resolution: "@humanfs/core@npm:0.19.1" @@ -383,6 +396,33 @@ __metadata: languageName: node linkType: hard +"@shikijs/engine-oniguruma@npm:^1.26.1": + version: 1.26.1 + resolution: "@shikijs/engine-oniguruma@npm:1.26.1" + dependencies: + "@shikijs/types": "npm:1.26.1" + "@shikijs/vscode-textmate": "npm:^10.0.1" + checksum: 10c0/ea5b222459346ad77a0504d27b1e5b47953062a2954d7cdd0632851b0b163fe9bc62c78b505056c5fb0152b12bbb5d076829ffcb3b2440f545287d1283da6a6a + languageName: node + linkType: hard + +"@shikijs/types@npm:1.26.1, @shikijs/types@npm:^1.26.1": + version: 1.26.1 + resolution: "@shikijs/types@npm:1.26.1" + dependencies: + "@shikijs/vscode-textmate": "npm:^10.0.1" + "@types/hast": "npm:^3.0.4" + checksum: 10c0/7f47a071c3ae844936a00b09ae1c973e5e2c9e501f7027a162bdfafc04c5a25ce8c5d593cdd5d83113254b3cda016e4d9fc9498e7808e96167e94e35f44d4f7b + languageName: node + linkType: hard + +"@shikijs/vscode-textmate@npm:^10.0.1": + version: 10.0.1 + resolution: "@shikijs/vscode-textmate@npm:10.0.1" + checksum: 10c0/acdbcf1b00d2503620ab50c2a23c7876444850ae0610c8e8b85a29587a333be40c9b98406ff17b9f87cbc64674dac6a2ada680374bde3e51a890e16cf1407490 + languageName: node + linkType: hard + "@sinonjs/commons@npm:^3.0.1": version: 3.0.1 resolution: "@sinonjs/commons@npm:3.0.1" @@ -470,6 +510,15 @@ __metadata: languageName: node linkType: hard +"@types/hast@npm:^3.0.4": + version: 3.0.4 + resolution: "@types/hast@npm:3.0.4" + dependencies: + "@types/unist": "npm:*" + checksum: 10c0/3249781a511b38f1d330fd1e3344eed3c4e7ea8eff82e835d35da78e637480d36fad37a78be5a7aed8465d237ad0446abc1150859d0fde395354ea634decf9f7 + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.6 resolution: "@types/istanbul-lib-coverage@npm:2.0.6" @@ -526,6 +575,13 @@ __metadata: languageName: node linkType: hard +"@types/unist@npm:*": + version: 3.0.3 + resolution: "@types/unist@npm:3.0.3" + checksum: 10c0/2b1e4adcab78388e088fcc3c0ae8700f76619dbcb4741d7d201f87e2cb346bfc29a89003cfea2d76c996e1061452e14fcd737e8b25aacf949c1f2d6b2bc3dd60 + languageName: node + linkType: hard + "@typescript-eslint/eslint-plugin@npm:8.17.0": version: 8.17.0 resolution: "@typescript-eslint/eslint-plugin@npm:8.17.0" @@ -1301,6 +1357,13 @@ __metadata: languageName: node linkType: hard +"entities@npm:^4.4.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 10c0/5b039739f7621f5d1ad996715e53d964035f75ad3b9a4d38c6b3804bb226e282ffeae2443624d8fdd9c47d8e926ae9ac009c54671243f0c3294c26af7cc85250 + languageName: node + linkType: hard + "env-paths@npm:^2.2.0": version: 2.2.1 resolution: "env-paths@npm:2.2.1" @@ -2557,6 +2620,15 @@ __metadata: languageName: node linkType: hard +"linkify-it@npm:^5.0.0": + version: 5.0.0 + resolution: "linkify-it@npm:5.0.0" + dependencies: + uc.micro: "npm:^2.0.0" + checksum: 10c0/ff4abbcdfa2003472fc3eb4b8e60905ec97718e11e33cca52059919a4c80cc0e0c2a14d23e23d8c00e5402bc5a885cdba8ca053a11483ab3cc8b3c7a52f88e2d + languageName: node + linkType: hard + "load-json-file@npm:^4.0.0": version: 4.0.0 resolution: "load-json-file@npm:4.0.0" @@ -2662,6 +2734,13 @@ __metadata: languageName: node linkType: hard +"lunr@npm:^2.3.9": + version: 2.3.9 + resolution: "lunr@npm:2.3.9" + checksum: 10c0/77d7dbb4fbd602aac161e2b50887d8eda28c0fa3b799159cee380fbb311f1e614219126ecbbd2c3a9c685f1720a8109b3c1ca85cc893c39b6c9cc6a62a1d8a8b + languageName: node + linkType: hard + "make-dir@npm:^4.0.0": version: 4.0.0 resolution: "make-dir@npm:4.0.0" @@ -2698,6 +2777,29 @@ __metadata: languageName: node linkType: hard +"markdown-it@npm:^14.1.0": + version: 14.1.0 + resolution: "markdown-it@npm:14.1.0" + dependencies: + argparse: "npm:^2.0.1" + entities: "npm:^4.4.0" + linkify-it: "npm:^5.0.0" + mdurl: "npm:^2.0.0" + punycode.js: "npm:^2.3.1" + uc.micro: "npm:^2.1.0" + bin: + markdown-it: bin/markdown-it.mjs + checksum: 10c0/9a6bb444181d2db7016a4173ae56a95a62c84d4cbfb6916a399b11d3e6581bf1cc2e4e1d07a2f022ae72c25f56db90fbe1e529fca16fbf9541659dc53480d4b4 + languageName: node + linkType: hard + +"mdurl@npm:^2.0.0": + version: 2.0.0 + resolution: "mdurl@npm:2.0.0" + checksum: 10c0/633db522272f75ce4788440669137c77540d74a83e9015666a9557a152c02e245b192edc20bc90ae953bbab727503994a53b236b4d9c99bdaee594d0e7dd2ce0 + languageName: node + linkType: hard + "memorystream@npm:^0.3.1": version: 0.3.1 resolution: "memorystream@npm:0.3.1" @@ -2740,7 +2842,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -3312,6 +3414,13 @@ __metadata: languageName: node linkType: hard +"punycode.js@npm:^2.3.1": + version: 2.3.1 + resolution: "punycode.js@npm:2.3.1" + checksum: 10c0/1d12c1c0e06127fa5db56bd7fdf698daf9a78104456a6b67326877afc21feaa821257b171539caedd2f0524027fa38e67b13dd094159c8d70b6d26d2bea4dfdb + languageName: node + linkType: hard + "punycode@npm:^2.1.0": version: 2.3.1 resolution: "punycode@npm:2.3.1" @@ -4042,6 +4151,32 @@ __metadata: languageName: node linkType: hard +"typedoc-plugin-markdown@npm:^4.4.1": + version: 4.4.1 + resolution: "typedoc-plugin-markdown@npm:4.4.1" + peerDependencies: + typedoc: 0.27.x + checksum: 10c0/54c9a25aed64d07258033c4d060acac15a618ee0494cbb2bc70fd10d03c82b3434715b6db01fbeb09d672cff736340666d70da1be83188e3a994048a0a0c6b65 + languageName: node + linkType: hard + +"typedoc@npm:^0.27.6": + version: 0.27.6 + resolution: "typedoc@npm:0.27.6" + dependencies: + "@gerrit0/mini-shiki": "npm:^1.24.0" + lunr: "npm:^2.3.9" + markdown-it: "npm:^14.1.0" + minimatch: "npm:^9.0.5" + yaml: "npm:^2.6.1" + peerDependencies: + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x + bin: + typedoc: bin/typedoc + checksum: 10c0/74af856fc2b9ca151567db8e08737a6ab8b29efb611414510eb833f80723245bc6ade00f2be7a410e335833cfd5e3deb1ae1ecfdb4da3a13c65faedd1f1805b0 + languageName: node + linkType: hard + "typescript-eslint@npm:^8.8.1": version: 8.17.0 resolution: "typescript-eslint@npm:8.17.0" @@ -4078,6 +4213,13 @@ __metadata: languageName: node linkType: hard +"uc.micro@npm:^2.0.0, uc.micro@npm:^2.1.0": + version: 2.1.0 + resolution: "uc.micro@npm:2.1.0" + checksum: 10c0/8862eddb412dda76f15db8ad1c640ccc2f47cdf8252a4a30be908d535602c8d33f9855dfcccb8b8837855c1ce1eaa563f7fa7ebe3c98fd0794351aab9b9c55fa + languageName: node + linkType: hard + "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2" @@ -4378,6 +4520,15 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.6.1": + version: 2.7.0 + resolution: "yaml@npm:2.7.0" + bin: + yaml: bin.mjs + checksum: 10c0/886a7d2abbd70704b79f1d2d05fe9fb0aa63aefb86e1cb9991837dced65193d300f5554747a872b4b10ae9a12bc5d5327e4d04205f70336e863e35e89d8f4ea9 + languageName: node + linkType: hard + "yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.9": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" From e8ba8663632aeb3b16074665a356e75ab51e8c4b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 13 Jan 2025 11:30:00 +0000 Subject: [PATCH 02/42] [bot] New pkg version: 0.0.0-alpha.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8e1ee1d..aa04cef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@centrifuge/sdk", - "version": "0.0.0-alpha.5", + "version": "0.0.0-alpha.6", "description": "", "homepage": "https://github.com/centrifuge/sdk/tree/main#readme", "author": "", From 6ca9ccf364b7745af235029d13183dbcf886f93a Mon Sep 17 00:00:00 2001 From: sophian Date: Mon, 13 Jan 2025 15:47:29 -0500 Subject: [PATCH 03/42] Test docs automation --- .github/ci-scripts/update-sdk-docs.js | 90 ++++ .github/workflows/update-docs.yml | 54 +++ docs/_README.md | 192 +++++++++ docs/_globals.md | 68 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/interfaces/_ReportFilter.md | 28 ++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 55 files changed, 3769 insertions(+) create mode 100644 .github/ci-scripts/update-sdk-docs.js create mode 100644 .github/workflows/update-docs.yml create mode 100644 docs/_README.md create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/interfaces/_ReportFilter.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/ci-scripts/update-sdk-docs.js b/.github/ci-scripts/update-sdk-docs.js new file mode 100644 index 0000000..28a9fd3 --- /dev/null +++ b/.github/ci-scripts/update-sdk-docs.js @@ -0,0 +1,90 @@ +const fs = require('fs/promises') +const path = require('path') +const simpleGit = require('simple-git') + +async function copyDocs(sourceDir, targetDir) { + try { + // Create the target directory if it doesn't exist + await fs.mkdir(targetDir, { recursive: true }) + + // Get all files from docs directory recursively + const getFiles = async (dir) => { + const items = await fs.readdir(dir, { withFileTypes: true }) + const files = await Promise.all( + items.map(async (item) => { + const filePath = path.join(dir, item.name) + return item.isDirectory() ? getFiles(filePath) : filePath + }) + ) + return files.flat() + } + + const docFiles = await getFiles(sourceDir) + + // Copy each file to the target directory, maintaining directory structure + for (const file of docFiles) { + const relativePath = path.relative(sourceDir, file) + const targetPath = path.join(targetDir, relativePath) + + // Create the nested directory structure if it doesn't exist + await fs.mkdir(path.dirname(targetPath), { recursive: true }) + + // Copy the file, overwriting if it exists + await fs.copyFile(file, targetPath) + console.log(`Copied: ${relativePath}`) + } + } catch (error) { + console.error('Error copying docs:', error) + throw error + } +} + +async function main() { + try { + // Clone the SDK docs repo + const git = simpleGit() + const repoUrl = `https://${process.env.GITHUB_TOKEN}@github.com/org/sdk-docs.git` + await git.clone(repoUrl, './sdk-docs') + + // Copy docs to the target location + await copyDocs( + './docs', // source directory + './sdk-docs/source/includes' // target directory + ) + + // Create and switch to a new branch + const branchName = `docs-update-${new Date().toISOString().split('T')[0]}` + await git + .cwd('./sdk-docs') // Ensure we're in the sdk-docs directory + .checkoutLocalBranch(branchName) + + // Add and commit changes + await git.add('.').commit('Update SDK documentation') + + // Push the new branch + await git.push('origin', branchName) + + // Create PR using GitHub CLI + const prTitle = 'Update SDK Documentation' + const prBody = 'Automated PR to update SDK documentation' + const prCommand = `gh pr create \ + --title "${prTitle}" \ + --body "${prBody}" \ + --base main \ + --head ${branchName} \ + --repo "org/sdk-docs"` + + const { execSync } = require('child_process') + execSync(prCommand, { + stdio: 'inherit', + env: { ...process.env }, + }) + + console.log('Successfully created PR with documentation updates') + } catch (error) { + console.error('Failed to process docs:', error) + process.exit(1) + } +} + +main() diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml new file mode 100644 index 0000000..75c52a7 --- /dev/null +++ b/.github/workflows/update-docs.yml @@ -0,0 +1,54 @@ +# This workflow will update the docs in the sdk-docs repo + +name: Update Docs + +on: + push: + branches: + - generate-docs + +jobs: + update-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout the repo + uses: actions/checkout@v4 + + - name: Run the gen:docs command + run: yarn gen:docs + + - name: Check and commit changes + id: commit_check + run: | + if [[ -n "$(git status --porcelain docs)" ]]; then + git add docs + git commit -m "Update docs" + echo "has_changes=true" >> "$GITHUB_OUTPUT" + else + echo "has_changes=false" >> "$GITHUB_OUTPUT" + fi + + - name: Push the changes + if: steps.commit_check.outputs.has_changes == 'true' + run: git push + + - name: Setup Node.js + if: steps.commit_check.outputs.has_changes == 'true' + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + if: steps.commit_check.outputs.has_changes == 'true' + run: yarn add simple-git + + - name: Setup GitHub CLI + if: steps.commit_check.outputs.has_changes == 'true' + run: | + gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}" + + - name: Update docs + if: steps.commit_check.outputs.has_changes == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: node ./.github/ci-scripts/update-sdk-docs.js diff --git a/docs/_README.md b/docs/_README.md new file mode 100644 index 0000000..c8677a5 --- /dev/null +++ b/docs/_README.md @@ -0,0 +1,192 @@ + +## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) + +The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. + +### Installation + +Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. + +```bash +npm install --save @centrifuge/sdk viem +## or +yarn install @centrifuge/sdk viem +``` + +### Init and config + +Create an instance and pass optional configuration + +```js +import Centrifuge from '@centrifuge/sdk' + +const centrifuge = new Centrifuge() +``` + +The following config options can be passed on initialization of the SDK: + +- `environment: 'mainnet' | 'demo' | 'dev'` + - Optional + - Default value: `mainnet` +- `rpcUrls: Record` + - Optional + - A object mapping chain ids to RPC URLs + +### Queries + +Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. + +```js +try { + const pool = await centrifuge.pools() +} catch (error) { + console.error(error) +} +``` + +```js +const subscription = centrifuge.pools().subscribe( + (pool) => console.log(pool), + (error) => console.error(error) +) +subscription.unsubscribe() +``` + +The returned results are either immutable values, or entities that can be further queried. + +### Transactions + +To perform transactions, you need to set a signer on the `centrifuge` instance. + +```js +centrifuge.setSigner(signer) +``` + +`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). + +With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. + +```js +const pool = await centrifuge.pool('1') +try { + const status = await pool.closeEpoch() + console.log(status) +} catch (error) { + console.error(error) +} +``` + +```js +const pool = await centrifuge.pool('1') +const subscription = pool.closeEpoch().subscribe( + (status) => console.log(pool), + (error) => console.error(error), + () => console.log('complete') +) +``` + +### Investments + +Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency + +Retrieve a vault by querying it from the pool: + +```js +const pool = await centrifuge.pool('1') +const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address +``` + +Query the state of an investment on the vault for an investor: + +```js +const investment = await vault.investment('0x123...') +// Will return an object containing: +// isAllowedToInvest - Whether an investor is allowed to invest in the tranche +// investmentCurrency - The ERC20 token that is used to invest in the vault +// investmentCurrencyBalance - The balance of the investor of the investment currency +// investmentCurrencyAllowance - The allowance of the vault +// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche +// shareBalance - The number of shares the investor has in the tranche +// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) +// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency +// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) +// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money +// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet +// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet +// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed +// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed +// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled +// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled +``` + +Invest in a vault: + +```js +const result = await vault.increaseInvestOrder(1000) +console.log(result.hash) +``` + +Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: + +```js +const result = await vault.claim() +``` + +### Reports + +Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. + +Available reports are: + +- `balanceSheet` +- `profitAndLoss` +- `cashflow` + +```ts +const pool = await centrifuge.pool('') +const balanceSheetReport = await pool.reports.balanceSheet() +``` + +#### Report Filtering + +Reports can be filtered using the `ReportFilter` type. + +```ts +type GroupBy = 'day' | 'month' | 'quarter' | 'year' + +const balanceSheetReport = await pool.reports.balanceSheet({ + from: '2024-01-01', + to: '2024-01-31', + groupBy: 'month', +}) +``` + +### Developer Docs + +#### Dev server + +```bash +yarn dev +``` + +#### Build + +```bash +yarn build +``` + +#### Test + +```bash +yarn test +yarn test:single +yarn test:simple:single ## without setup file, faster and without tenderly setup +``` + +#### PR Naming Convention + +PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +#### Semantic Versioning + +PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..3812d1c --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,68 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Interfaces + +- [ReportFilter](#interfaces-reportfilter) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..2c0d5eb --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..c98f636 --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..14687c5 --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..b67c9ea --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..b3c7cb4 --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..0da8116 --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..eb82356 --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..099262c --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..26dab13 --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md new file mode 100644 index 0000000..6a390bc --- /dev/null +++ b/docs/interfaces/_ReportFilter.md @@ -0,0 +1,28 @@ + +## Interface: ReportFilter + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L13) + +### Properties + +#### from? + +> `optional` **from**: `string` + +Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L14) + +*** + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L16) + +*** + +#### to? + +> `optional` **to**: `string` + +Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..68cc36f --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..96419c0 --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..09e9d36 --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..05a88e4 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..c12e2b9 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..3374c82 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..427a268 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..206de96 --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..1316d34 --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..7026278 --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..edcb178 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..5f25c9b --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..11dcd41 --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..4da9e4d --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..8eb0dcb --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..9b3c2ad --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..a84e615 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..8116a55 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..07cf42f --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..c90a768 --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..d5b9a72 --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..d5fda0b --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..81ef2d8 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..a450f9d --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..6e06d0c --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..0b4ccd2 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..7fec257 --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..fcab68d --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..901826a --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..d362923 --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..5b289a0 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..83eb39f --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..471d046 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..778ac4a --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..4e622a0 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..cb33281 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..11a73c8 --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..6621c5b --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..1178ba2 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..2027b8a --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..c430415 --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L64) From eadf4341f69bc1df12295b15c0ea33e49416112c Mon Sep 17 00:00:00 2001 From: sophian Date: Mon, 13 Jan 2025 15:50:09 -0500 Subject: [PATCH 04/42] Force yarn@stable in workflow --- .github/workflows/update-docs.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 75c52a7..10f2be1 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -38,6 +38,12 @@ jobs: with: node-version: '20' + - name: Setup Yarn + if: steps.commit_check.outputs.has_changes == 'true' + run: | + corepack enable + corepack prepare yarn@stable --activate + - name: Install dependencies if: steps.commit_check.outputs.has_changes == 'true' run: yarn add simple-git From 4a05f367c61705b859f64e3bff347fedb1df6fd4 Mon Sep 17 00:00:00 2001 From: sophian Date: Mon, 13 Jan 2025 15:51:03 -0500 Subject: [PATCH 05/42] Try setting stable version manually --- .github/workflows/update-docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 10f2be1..ab16ab4 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -43,6 +43,7 @@ jobs: run: | corepack enable corepack prepare yarn@stable --activate + yarn set version stable - name: Install dependencies if: steps.commit_check.outputs.has_changes == 'true' From d825475d6ca9f0ff790daf5926420077868c166d Mon Sep 17 00:00:00 2001 From: sophian Date: Mon, 13 Jan 2025 15:52:25 -0500 Subject: [PATCH 06/42] Update order --- .github/workflows/update-docs.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index ab16ab4..954cc14 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -14,6 +14,16 @@ jobs: - name: Checkout the repo uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Setup Yarn + run: | + corepack enable + corepack prepare yarn@4.5.0 --activate + - name: Run the gen:docs command run: yarn gen:docs @@ -32,19 +42,6 @@ jobs: if: steps.commit_check.outputs.has_changes == 'true' run: git push - - name: Setup Node.js - if: steps.commit_check.outputs.has_changes == 'true' - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Setup Yarn - if: steps.commit_check.outputs.has_changes == 'true' - run: | - corepack enable - corepack prepare yarn@stable --activate - yarn set version stable - - name: Install dependencies if: steps.commit_check.outputs.has_changes == 'true' run: yarn add simple-git From 07bed065edba6338bc0fe7bb550eb514fb85ecdf Mon Sep 17 00:00:00 2001 From: sophian Date: Mon, 13 Jan 2025 15:53:42 -0500 Subject: [PATCH 07/42] Install deps before gen:docs --- .github/workflows/update-docs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 954cc14..18aea02 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -24,6 +24,9 @@ jobs: corepack enable corepack prepare yarn@4.5.0 --activate + - name: Install dependencies + run: yarn install + - name: Run the gen:docs command run: yarn gen:docs From 2f5fb408538a3a7eac1ca2fa38ace46e1ee587be Mon Sep 17 00:00:00 2001 From: sophian Date: Mon, 13 Jan 2025 15:55:14 -0500 Subject: [PATCH 08/42] Add user to github --- .github/workflows/update-docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 18aea02..1a321cb 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -33,6 +33,8 @@ jobs: - name: Check and commit changes id: commit_check run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" if [[ -n "$(git status --porcelain docs)" ]]; then git add docs git commit -m "Update docs" From ef531bd0344f2ac74720f9cafcec5ad0b3b8cb1b Mon Sep 17 00:00:00 2001 From: sophian Date: Mon, 13 Jan 2025 16:01:36 -0500 Subject: [PATCH 09/42] Convert script to cjs file --- ...update-sdk-docs.js => update-sdk-docs.cjs} | 3 + .github/workflows/update-docs.yml | 2 +- docs/_README.md | 192 --------- docs/_globals.md | 68 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/interfaces/_ReportFilter.md | 28 -- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - 55 files changed, 4 insertions(+), 3626 deletions(-) rename .github/ci-scripts/{update-sdk-docs.js => update-sdk-docs.cjs} (95%) delete mode 100644 docs/_README.md delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/interfaces/_ReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/ci-scripts/update-sdk-docs.js b/.github/ci-scripts/update-sdk-docs.cjs similarity index 95% rename from .github/ci-scripts/update-sdk-docs.js rename to .github/ci-scripts/update-sdk-docs.cjs index 28a9fd3..ea1ced6 100644 --- a/.github/ci-scripts/update-sdk-docs.js +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -46,6 +46,9 @@ async function main() { const repoUrl = `https://${process.env.GITHUB_TOKEN}@github.com/org/sdk-docs.git` await git.clone(repoUrl, './sdk-docs') + // TODO: remove: Change into the sdk-docs directory and checkout the branch + await git.cwd('./sdk-docs').checkout('generate-docs') + // Copy docs to the target location await copyDocs( './docs', // source directory diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 1a321cb..2d8511f 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -60,4 +60,4 @@ jobs: if: steps.commit_check.outputs.has_changes == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: node ./.github/ci-scripts/update-sdk-docs.js + run: node ./.github/ci-scripts/update-sdk-docs.cjs diff --git a/docs/_README.md b/docs/_README.md deleted file mode 100644 index c8677a5..0000000 --- a/docs/_README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) - -The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. - -### Installation - -Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. - -```bash -npm install --save @centrifuge/sdk viem -## or -yarn install @centrifuge/sdk viem -``` - -### Init and config - -Create an instance and pass optional configuration - -```js -import Centrifuge from '@centrifuge/sdk' - -const centrifuge = new Centrifuge() -``` - -The following config options can be passed on initialization of the SDK: - -- `environment: 'mainnet' | 'demo' | 'dev'` - - Optional - - Default value: `mainnet` -- `rpcUrls: Record` - - Optional - - A object mapping chain ids to RPC URLs - -### Queries - -Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. - -```js -try { - const pool = await centrifuge.pools() -} catch (error) { - console.error(error) -} -``` - -```js -const subscription = centrifuge.pools().subscribe( - (pool) => console.log(pool), - (error) => console.error(error) -) -subscription.unsubscribe() -``` - -The returned results are either immutable values, or entities that can be further queried. - -### Transactions - -To perform transactions, you need to set a signer on the `centrifuge` instance. - -```js -centrifuge.setSigner(signer) -``` - -`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). - -With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. - -```js -const pool = await centrifuge.pool('1') -try { - const status = await pool.closeEpoch() - console.log(status) -} catch (error) { - console.error(error) -} -``` - -```js -const pool = await centrifuge.pool('1') -const subscription = pool.closeEpoch().subscribe( - (status) => console.log(pool), - (error) => console.error(error), - () => console.log('complete') -) -``` - -### Investments - -Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency - -Retrieve a vault by querying it from the pool: - -```js -const pool = await centrifuge.pool('1') -const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address -``` - -Query the state of an investment on the vault for an investor: - -```js -const investment = await vault.investment('0x123...') -// Will return an object containing: -// isAllowedToInvest - Whether an investor is allowed to invest in the tranche -// investmentCurrency - The ERC20 token that is used to invest in the vault -// investmentCurrencyBalance - The balance of the investor of the investment currency -// investmentCurrencyAllowance - The allowance of the vault -// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche -// shareBalance - The number of shares the investor has in the tranche -// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) -// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency -// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) -// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money -// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet -// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet -// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed -// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed -// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled -// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled -``` - -Invest in a vault: - -```js -const result = await vault.increaseInvestOrder(1000) -console.log(result.hash) -``` - -Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: - -```js -const result = await vault.claim() -``` - -### Reports - -Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. - -Available reports are: - -- `balanceSheet` -- `profitAndLoss` -- `cashflow` - -```ts -const pool = await centrifuge.pool('') -const balanceSheetReport = await pool.reports.balanceSheet() -``` - -#### Report Filtering - -Reports can be filtered using the `ReportFilter` type. - -```ts -type GroupBy = 'day' | 'month' | 'quarter' | 'year' - -const balanceSheetReport = await pool.reports.balanceSheet({ - from: '2024-01-01', - to: '2024-01-31', - groupBy: 'month', -}) -``` - -### Developer Docs - -#### Dev server - -```bash -yarn dev -``` - -#### Build - -```bash -yarn build -``` - -#### Test - -```bash -yarn test -yarn test:single -yarn test:simple:single ## without setup file, faster and without tenderly setup -``` - -#### PR Naming Convention - -PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. - -#### Semantic Versioning - -PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index 3812d1c..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,68 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Interfaces - -- [ReportFilter](#interfaces-reportfilter) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index 2c0d5eb..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index c98f636..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index 14687c5..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index b67c9ea..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index b3c7cb4..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index 0da8116..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index eb82356..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index 099262c..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index 26dab13..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md deleted file mode 100644 index 6a390bc..0000000 --- a/docs/interfaces/_ReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Interface: ReportFilter - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L13) - -### Properties - -#### from? - -> `optional` **from**: `string` - -Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L14) - -*** - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L16) - -*** - -#### to? - -> `optional` **to**: `string` - -Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index 68cc36f..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index 96419c0..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index 09e9d36..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index 05a88e4..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index c12e2b9..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index 3374c82..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index 427a268..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 206de96..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index 1316d34..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index 7026278..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index edcb178..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index 5f25c9b..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index 11dcd41..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index 4da9e4d..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index 8eb0dcb..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index 9b3c2ad..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index a84e615..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index 8116a55..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index 07cf42f..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index c90a768..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index d5b9a72..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index d5fda0b..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index 81ef2d8..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index a450f9d..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index 6e06d0c..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index 0b4ccd2..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index 7fec257..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index fcab68d..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index 901826a..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index d362923..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 5b289a0..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index 83eb39f..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index 471d046..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index 778ac4a..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index 4e622a0..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index cb33281..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index 11a73c8..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index 6621c5b..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 1178ba2..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index 2027b8a..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index c430415..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/centrifuge-sdk/blob/e8ba8663632aeb3b16074665a356e75ab51e8c4b/src/types/transaction.ts#L64) From 095efe08156a974db0fafe56584aa107b62503b4 Mon Sep 17 00:00:00 2001 From: sophian Date: Mon, 13 Jan 2025 16:05:07 -0500 Subject: [PATCH 10/42] Update clone url --- .github/ci-scripts/update-sdk-docs.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index ea1ced6..f315e95 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -43,8 +43,8 @@ async function main() { try { // Clone the SDK docs repo const git = simpleGit() - const repoUrl = `https://${process.env.GITHUB_TOKEN}@github.com/org/sdk-docs.git` - await git.clone(repoUrl, './sdk-docs') + const repoUrl = `https://x-access-token:${process.env.GITHUB_TOKEN}@github.com/org/sdk-docs.git` + await git.clone(repoUrl, './sdk-docs', ['--branch', 'generate-docs']) // TODO: remove: Change into the sdk-docs directory and checkout the branch await git.cwd('./sdk-docs').checkout('generate-docs') From 5b6fde1a85a1d7cc8814ed123c00a6f727c2c0b4 Mon Sep 17 00:00:00 2001 From: sophian Date: Mon, 13 Jan 2025 16:08:12 -0500 Subject: [PATCH 11/42] Add org name --- .github/ci-scripts/update-sdk-docs.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index f315e95..429dc01 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -43,7 +43,7 @@ async function main() { try { // Clone the SDK docs repo const git = simpleGit() - const repoUrl = `https://x-access-token:${process.env.GITHUB_TOKEN}@github.com/org/sdk-docs.git` + const repoUrl = `https://x-access-token:${process.env.GITHUB_TOKEN}@github.com/centrifuge/sdk-docs.git` await git.clone(repoUrl, './sdk-docs', ['--branch', 'generate-docs']) // TODO: remove: Change into the sdk-docs directory and checkout the branch From c3133855cdc5d49bd0eaf4941f4b30743aea4145 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 09:14:39 -0500 Subject: [PATCH 12/42] Remove docs --- .github/workflows/update-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 2d8511f..f49590d 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -11,7 +11,7 @@ jobs: update-docs: runs-on: ubuntu-latest steps: - - name: Checkout the repo + - name: Checkout repo uses: actions/checkout@v4 - name: Setup Node.js @@ -27,7 +27,7 @@ jobs: - name: Install dependencies run: yarn install - - name: Run the gen:docs command + - name: Run gen:docs command run: yarn gen:docs - name: Check and commit changes From 1c2f46108a7402bd0630d862d5e722fba9bd83db Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 09:51:43 -0500 Subject: [PATCH 13/42] Checkout branch later --- .github/ci-scripts/update-sdk-docs.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index 429dc01..f1e343d 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -44,10 +44,10 @@ async function main() { // Clone the SDK docs repo const git = simpleGit() const repoUrl = `https://x-access-token:${process.env.GITHUB_TOKEN}@github.com/centrifuge/sdk-docs.git` - await git.clone(repoUrl, './sdk-docs', ['--branch', 'generate-docs']) + await git.clone(repoUrl, './sdk-docs') // TODO: remove: Change into the sdk-docs directory and checkout the branch - await git.cwd('./sdk-docs').checkout('generate-docs') + // await git.cwd('./sdk-docs').checkout('generate-docs') // Copy docs to the target location await copyDocs( From 20104b15da17b66f479454c1de0079c5cbccadca Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 14:52:25 +0000 Subject: [PATCH 14/42] Update docs --- docs/_README.md | 192 +++++++++ docs/_globals.md | 68 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/interfaces/_ReportFilter.md | 28 ++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 53 files changed, 3625 insertions(+) create mode 100644 docs/_README.md create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/interfaces/_ReportFilter.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_README.md b/docs/_README.md new file mode 100644 index 0000000..c8677a5 --- /dev/null +++ b/docs/_README.md @@ -0,0 +1,192 @@ + +## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) + +The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. + +### Installation + +Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. + +```bash +npm install --save @centrifuge/sdk viem +## or +yarn install @centrifuge/sdk viem +``` + +### Init and config + +Create an instance and pass optional configuration + +```js +import Centrifuge from '@centrifuge/sdk' + +const centrifuge = new Centrifuge() +``` + +The following config options can be passed on initialization of the SDK: + +- `environment: 'mainnet' | 'demo' | 'dev'` + - Optional + - Default value: `mainnet` +- `rpcUrls: Record` + - Optional + - A object mapping chain ids to RPC URLs + +### Queries + +Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. + +```js +try { + const pool = await centrifuge.pools() +} catch (error) { + console.error(error) +} +``` + +```js +const subscription = centrifuge.pools().subscribe( + (pool) => console.log(pool), + (error) => console.error(error) +) +subscription.unsubscribe() +``` + +The returned results are either immutable values, or entities that can be further queried. + +### Transactions + +To perform transactions, you need to set a signer on the `centrifuge` instance. + +```js +centrifuge.setSigner(signer) +``` + +`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). + +With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. + +```js +const pool = await centrifuge.pool('1') +try { + const status = await pool.closeEpoch() + console.log(status) +} catch (error) { + console.error(error) +} +``` + +```js +const pool = await centrifuge.pool('1') +const subscription = pool.closeEpoch().subscribe( + (status) => console.log(pool), + (error) => console.error(error), + () => console.log('complete') +) +``` + +### Investments + +Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency + +Retrieve a vault by querying it from the pool: + +```js +const pool = await centrifuge.pool('1') +const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address +``` + +Query the state of an investment on the vault for an investor: + +```js +const investment = await vault.investment('0x123...') +// Will return an object containing: +// isAllowedToInvest - Whether an investor is allowed to invest in the tranche +// investmentCurrency - The ERC20 token that is used to invest in the vault +// investmentCurrencyBalance - The balance of the investor of the investment currency +// investmentCurrencyAllowance - The allowance of the vault +// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche +// shareBalance - The number of shares the investor has in the tranche +// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) +// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency +// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) +// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money +// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet +// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet +// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed +// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed +// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled +// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled +``` + +Invest in a vault: + +```js +const result = await vault.increaseInvestOrder(1000) +console.log(result.hash) +``` + +Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: + +```js +const result = await vault.claim() +``` + +### Reports + +Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. + +Available reports are: + +- `balanceSheet` +- `profitAndLoss` +- `cashflow` + +```ts +const pool = await centrifuge.pool('') +const balanceSheetReport = await pool.reports.balanceSheet() +``` + +#### Report Filtering + +Reports can be filtered using the `ReportFilter` type. + +```ts +type GroupBy = 'day' | 'month' | 'quarter' | 'year' + +const balanceSheetReport = await pool.reports.balanceSheet({ + from: '2024-01-01', + to: '2024-01-31', + groupBy: 'month', +}) +``` + +### Developer Docs + +#### Dev server + +```bash +yarn dev +``` + +#### Build + +```bash +yarn build +``` + +#### Test + +```bash +yarn test +yarn test:single +yarn test:simple:single ## without setup file, faster and without tenderly setup +``` + +#### PR Naming Convention + +PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +#### Semantic Versioning + +PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..3812d1c --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,68 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Interfaces + +- [ReportFilter](#interfaces-reportfilter) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..541895e --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..ec8b6c6 --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..a7fa42f --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..d7dbfe3 --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..f6e6d52 --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..34a7e67 --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..f43a0f7 --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..84adaad --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..9282a59 --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md new file mode 100644 index 0000000..f804644 --- /dev/null +++ b/docs/interfaces/_ReportFilter.md @@ -0,0 +1,28 @@ + +## Interface: ReportFilter + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L13) + +### Properties + +#### from? + +> `optional` **from**: `string` + +Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L14) + +*** + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L16) + +*** + +#### to? + +> `optional` **to**: `string` + +Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..b11fd93 --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..3dfbab3 --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..26675cb --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..c054b53 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..4a870c6 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..cc8a144 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..30f0531 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..76cf550 --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..cee9a3b --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..563fc0a --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..6d3b669 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..a2561c6 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..a3adbe3 --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..3e29a85 --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..ef644fd --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..57bf58d --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..8fd280e --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..2530039 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..a315314 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..8dc7468 --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..9d0bbc2 --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..b4cbe46 --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..fa166e2 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..541e7c3 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..fc248fb --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..a2fd2c3 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..dd41350 --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..4f70404 --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..3787bb0 --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..dbb555a --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..22be344 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..cc99a19 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..cc7191e --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..695e2e1 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..55cd548 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..a336886 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..b7e35ee --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..735a691 --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..68bda57 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..9e144ad --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..90235ee --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L64) From 20f6f7405dbfe43e55dbfdf56cb48d163938a551 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 09:56:11 -0500 Subject: [PATCH 15/42] Login to github --- .github/ci-scripts/update-sdk-docs.cjs | 11 +- docs/_README.md | 192 --------- docs/_globals.md | 68 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/interfaces/_ReportFilter.md | 28 -- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - 54 files changed, 6 insertions(+), 3630 deletions(-) delete mode 100644 docs/_README.md delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/interfaces/_ReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index f1e343d..120a000 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -46,8 +46,11 @@ async function main() { const repoUrl = `https://x-access-token:${process.env.GITHUB_TOKEN}@github.com/centrifuge/sdk-docs.git` await git.clone(repoUrl, './sdk-docs') - // TODO: remove: Change into the sdk-docs directory and checkout the branch - // await git.cwd('./sdk-docs').checkout('generate-docs') + // Set Git identity for this repo + await git + .cwd('./sdk-docs') + .addConfig('user.name', 'github-actions[bot]') + .addConfig('user.email', 'github-actions[bot]@users.noreply.github.com') // Copy docs to the target location await copyDocs( @@ -57,9 +60,7 @@ async function main() { // Create and switch to a new branch const branchName = `docs-update-${new Date().toISOString().split('T')[0]}` - await git - .cwd('./sdk-docs') // Ensure we're in the sdk-docs directory - .checkoutLocalBranch(branchName) + await git.checkoutLocalBranch(branchName) // Add and commit changes await git.add('.').commit('Update SDK documentation') diff --git a/docs/_README.md b/docs/_README.md deleted file mode 100644 index c8677a5..0000000 --- a/docs/_README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) - -The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. - -### Installation - -Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. - -```bash -npm install --save @centrifuge/sdk viem -## or -yarn install @centrifuge/sdk viem -``` - -### Init and config - -Create an instance and pass optional configuration - -```js -import Centrifuge from '@centrifuge/sdk' - -const centrifuge = new Centrifuge() -``` - -The following config options can be passed on initialization of the SDK: - -- `environment: 'mainnet' | 'demo' | 'dev'` - - Optional - - Default value: `mainnet` -- `rpcUrls: Record` - - Optional - - A object mapping chain ids to RPC URLs - -### Queries - -Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. - -```js -try { - const pool = await centrifuge.pools() -} catch (error) { - console.error(error) -} -``` - -```js -const subscription = centrifuge.pools().subscribe( - (pool) => console.log(pool), - (error) => console.error(error) -) -subscription.unsubscribe() -``` - -The returned results are either immutable values, or entities that can be further queried. - -### Transactions - -To perform transactions, you need to set a signer on the `centrifuge` instance. - -```js -centrifuge.setSigner(signer) -``` - -`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). - -With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. - -```js -const pool = await centrifuge.pool('1') -try { - const status = await pool.closeEpoch() - console.log(status) -} catch (error) { - console.error(error) -} -``` - -```js -const pool = await centrifuge.pool('1') -const subscription = pool.closeEpoch().subscribe( - (status) => console.log(pool), - (error) => console.error(error), - () => console.log('complete') -) -``` - -### Investments - -Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency - -Retrieve a vault by querying it from the pool: - -```js -const pool = await centrifuge.pool('1') -const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address -``` - -Query the state of an investment on the vault for an investor: - -```js -const investment = await vault.investment('0x123...') -// Will return an object containing: -// isAllowedToInvest - Whether an investor is allowed to invest in the tranche -// investmentCurrency - The ERC20 token that is used to invest in the vault -// investmentCurrencyBalance - The balance of the investor of the investment currency -// investmentCurrencyAllowance - The allowance of the vault -// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche -// shareBalance - The number of shares the investor has in the tranche -// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) -// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency -// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) -// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money -// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet -// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet -// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed -// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed -// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled -// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled -``` - -Invest in a vault: - -```js -const result = await vault.increaseInvestOrder(1000) -console.log(result.hash) -``` - -Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: - -```js -const result = await vault.claim() -``` - -### Reports - -Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. - -Available reports are: - -- `balanceSheet` -- `profitAndLoss` -- `cashflow` - -```ts -const pool = await centrifuge.pool('') -const balanceSheetReport = await pool.reports.balanceSheet() -``` - -#### Report Filtering - -Reports can be filtered using the `ReportFilter` type. - -```ts -type GroupBy = 'day' | 'month' | 'quarter' | 'year' - -const balanceSheetReport = await pool.reports.balanceSheet({ - from: '2024-01-01', - to: '2024-01-31', - groupBy: 'month', -}) -``` - -### Developer Docs - -#### Dev server - -```bash -yarn dev -``` - -#### Build - -```bash -yarn build -``` - -#### Test - -```bash -yarn test -yarn test:single -yarn test:simple:single ## without setup file, faster and without tenderly setup -``` - -#### PR Naming Convention - -PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. - -#### Semantic Versioning - -PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index 3812d1c..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,68 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Interfaces - -- [ReportFilter](#interfaces-reportfilter) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index 541895e..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index ec8b6c6..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index a7fa42f..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index d7dbfe3..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index f6e6d52..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index 34a7e67..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index f43a0f7..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index 84adaad..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index 9282a59..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md deleted file mode 100644 index f804644..0000000 --- a/docs/interfaces/_ReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Interface: ReportFilter - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L13) - -### Properties - -#### from? - -> `optional` **from**: `string` - -Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L14) - -*** - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L16) - -*** - -#### to? - -> `optional` **to**: `string` - -Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index b11fd93..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index 3dfbab3..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index 26675cb..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index c054b53..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index 4a870c6..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index cc8a144..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index 30f0531..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 76cf550..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index cee9a3b..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index 563fc0a..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index 6d3b669..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index a2561c6..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index a3adbe3..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index 3e29a85..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index ef644fd..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index 57bf58d..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 8fd280e..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index 2530039..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index a315314..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 8dc7468..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index 9d0bbc2..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index b4cbe46..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index fa166e2..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index 541e7c3..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index fc248fb..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index a2fd2c3..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index dd41350..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index 4f70404..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index 3787bb0..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index dbb555a..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 22be344..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index cc99a19..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index cc7191e..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index 695e2e1..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index 55cd548..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index a336886..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index b7e35ee..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index 735a691..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 68bda57..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index 9e144ad..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index 90235ee..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/1c2f46108a7402bd0630d862d5e722fba9bd83db/src/types/transaction.ts#L64) From 60a8a256651ed019f6b13926502d056b8076179f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 14:56:48 +0000 Subject: [PATCH 16/42] Update docs --- docs/_README.md | 192 +++++++++ docs/_globals.md | 68 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/interfaces/_ReportFilter.md | 28 ++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 53 files changed, 3625 insertions(+) create mode 100644 docs/_README.md create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/interfaces/_ReportFilter.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_README.md b/docs/_README.md new file mode 100644 index 0000000..c8677a5 --- /dev/null +++ b/docs/_README.md @@ -0,0 +1,192 @@ + +## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) + +The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. + +### Installation + +Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. + +```bash +npm install --save @centrifuge/sdk viem +## or +yarn install @centrifuge/sdk viem +``` + +### Init and config + +Create an instance and pass optional configuration + +```js +import Centrifuge from '@centrifuge/sdk' + +const centrifuge = new Centrifuge() +``` + +The following config options can be passed on initialization of the SDK: + +- `environment: 'mainnet' | 'demo' | 'dev'` + - Optional + - Default value: `mainnet` +- `rpcUrls: Record` + - Optional + - A object mapping chain ids to RPC URLs + +### Queries + +Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. + +```js +try { + const pool = await centrifuge.pools() +} catch (error) { + console.error(error) +} +``` + +```js +const subscription = centrifuge.pools().subscribe( + (pool) => console.log(pool), + (error) => console.error(error) +) +subscription.unsubscribe() +``` + +The returned results are either immutable values, or entities that can be further queried. + +### Transactions + +To perform transactions, you need to set a signer on the `centrifuge` instance. + +```js +centrifuge.setSigner(signer) +``` + +`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). + +With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. + +```js +const pool = await centrifuge.pool('1') +try { + const status = await pool.closeEpoch() + console.log(status) +} catch (error) { + console.error(error) +} +``` + +```js +const pool = await centrifuge.pool('1') +const subscription = pool.closeEpoch().subscribe( + (status) => console.log(pool), + (error) => console.error(error), + () => console.log('complete') +) +``` + +### Investments + +Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency + +Retrieve a vault by querying it from the pool: + +```js +const pool = await centrifuge.pool('1') +const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address +``` + +Query the state of an investment on the vault for an investor: + +```js +const investment = await vault.investment('0x123...') +// Will return an object containing: +// isAllowedToInvest - Whether an investor is allowed to invest in the tranche +// investmentCurrency - The ERC20 token that is used to invest in the vault +// investmentCurrencyBalance - The balance of the investor of the investment currency +// investmentCurrencyAllowance - The allowance of the vault +// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche +// shareBalance - The number of shares the investor has in the tranche +// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) +// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency +// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) +// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money +// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet +// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet +// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed +// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed +// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled +// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled +``` + +Invest in a vault: + +```js +const result = await vault.increaseInvestOrder(1000) +console.log(result.hash) +``` + +Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: + +```js +const result = await vault.claim() +``` + +### Reports + +Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. + +Available reports are: + +- `balanceSheet` +- `profitAndLoss` +- `cashflow` + +```ts +const pool = await centrifuge.pool('') +const balanceSheetReport = await pool.reports.balanceSheet() +``` + +#### Report Filtering + +Reports can be filtered using the `ReportFilter` type. + +```ts +type GroupBy = 'day' | 'month' | 'quarter' | 'year' + +const balanceSheetReport = await pool.reports.balanceSheet({ + from: '2024-01-01', + to: '2024-01-31', + groupBy: 'month', +}) +``` + +### Developer Docs + +#### Dev server + +```bash +yarn dev +``` + +#### Build + +```bash +yarn build +``` + +#### Test + +```bash +yarn test +yarn test:single +yarn test:simple:single ## without setup file, faster and without tenderly setup +``` + +#### PR Naming Convention + +PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +#### Semantic Versioning + +PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..3812d1c --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,68 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Interfaces + +- [ReportFilter](#interfaces-reportfilter) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..bd02375 --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..351d069 --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..e639971 --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..1af8580 --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..0dceb62 --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..dd75bc9 --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..520237a --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..40d79d4 --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..6a84415 --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md new file mode 100644 index 0000000..538edf7 --- /dev/null +++ b/docs/interfaces/_ReportFilter.md @@ -0,0 +1,28 @@ + +## Interface: ReportFilter + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L13) + +### Properties + +#### from? + +> `optional` **from**: `string` + +Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L14) + +*** + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L16) + +*** + +#### to? + +> `optional` **to**: `string` + +Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..96d5aa9 --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..d6a3a99 --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..52bbda8 --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..e8ce855 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..082fc44 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..7778835 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..e0c115d --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..0eeb6f9 --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..144121a --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..acf35df --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..672dd17 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..e7684a2 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..cc40158 --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..57626d0 --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..10e715b --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..f5a1056 --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..288b7fa --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..016b932 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..72446ba --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..24c3c1e --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..314d9fc --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..9645379 --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..629d041 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..7b2dee7 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..ebc1eca --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..a4506f9 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..658cb2e --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..e02016a --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..af1a8b7 --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..975b3bb --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..2c12e82 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..694e203 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..7d8e4e6 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..78be124 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..79959a8 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..2589d0a --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..81f4707 --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..bd917e1 --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..7d936dc --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..352a12c --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..51bfebc --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L64) From fef767650aefbfdf096f8c5426960ef60453f908 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 13:41:48 -0500 Subject: [PATCH 17/42] Use PAT token to allow pushing to repo --- .github/ci-scripts/update-sdk-docs.cjs | 9 +- .github/workflows/update-docs.yml | 2 +- docs/_README.md | 192 --------- docs/_globals.md | 68 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/interfaces/_ReportFilter.md | 28 -- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - 55 files changed, 7 insertions(+), 3629 deletions(-) delete mode 100644 docs/_README.md delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/interfaces/_ReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index 120a000..46fa94b 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -43,7 +43,7 @@ async function main() { try { // Clone the SDK docs repo const git = simpleGit() - const repoUrl = `https://x-access-token:${process.env.GITHUB_TOKEN}@github.com/centrifuge/sdk-docs.git` + const repoUrl = 'https://github.com/centrifuge/sdk-docs.git' await git.clone(repoUrl, './sdk-docs') // Set Git identity for this repo @@ -76,12 +76,15 @@ async function main() { --body "${prBody}" \ --base main \ --head ${branchName} \ - --repo "org/sdk-docs"` + --repo "centrifuge/sdk-docs"` const { execSync } = require('child_process') execSync(prCommand, { stdio: 'inherit', - env: { ...process.env }, + env: { + ...process.env, + GH_TOKEN: process.env.PAT_TOKEN, + }, }) console.log('Successfully created PR with documentation updates') diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index f49590d..a8ff74f 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -59,5 +59,5 @@ jobs: - name: Update docs if: steps.commit_check.outputs.has_changes == 'true' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} run: node ./.github/ci-scripts/update-sdk-docs.cjs diff --git a/docs/_README.md b/docs/_README.md deleted file mode 100644 index c8677a5..0000000 --- a/docs/_README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) - -The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. - -### Installation - -Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. - -```bash -npm install --save @centrifuge/sdk viem -## or -yarn install @centrifuge/sdk viem -``` - -### Init and config - -Create an instance and pass optional configuration - -```js -import Centrifuge from '@centrifuge/sdk' - -const centrifuge = new Centrifuge() -``` - -The following config options can be passed on initialization of the SDK: - -- `environment: 'mainnet' | 'demo' | 'dev'` - - Optional - - Default value: `mainnet` -- `rpcUrls: Record` - - Optional - - A object mapping chain ids to RPC URLs - -### Queries - -Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. - -```js -try { - const pool = await centrifuge.pools() -} catch (error) { - console.error(error) -} -``` - -```js -const subscription = centrifuge.pools().subscribe( - (pool) => console.log(pool), - (error) => console.error(error) -) -subscription.unsubscribe() -``` - -The returned results are either immutable values, or entities that can be further queried. - -### Transactions - -To perform transactions, you need to set a signer on the `centrifuge` instance. - -```js -centrifuge.setSigner(signer) -``` - -`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). - -With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. - -```js -const pool = await centrifuge.pool('1') -try { - const status = await pool.closeEpoch() - console.log(status) -} catch (error) { - console.error(error) -} -``` - -```js -const pool = await centrifuge.pool('1') -const subscription = pool.closeEpoch().subscribe( - (status) => console.log(pool), - (error) => console.error(error), - () => console.log('complete') -) -``` - -### Investments - -Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency - -Retrieve a vault by querying it from the pool: - -```js -const pool = await centrifuge.pool('1') -const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address -``` - -Query the state of an investment on the vault for an investor: - -```js -const investment = await vault.investment('0x123...') -// Will return an object containing: -// isAllowedToInvest - Whether an investor is allowed to invest in the tranche -// investmentCurrency - The ERC20 token that is used to invest in the vault -// investmentCurrencyBalance - The balance of the investor of the investment currency -// investmentCurrencyAllowance - The allowance of the vault -// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche -// shareBalance - The number of shares the investor has in the tranche -// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) -// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency -// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) -// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money -// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet -// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet -// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed -// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed -// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled -// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled -``` - -Invest in a vault: - -```js -const result = await vault.increaseInvestOrder(1000) -console.log(result.hash) -``` - -Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: - -```js -const result = await vault.claim() -``` - -### Reports - -Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. - -Available reports are: - -- `balanceSheet` -- `profitAndLoss` -- `cashflow` - -```ts -const pool = await centrifuge.pool('') -const balanceSheetReport = await pool.reports.balanceSheet() -``` - -#### Report Filtering - -Reports can be filtered using the `ReportFilter` type. - -```ts -type GroupBy = 'day' | 'month' | 'quarter' | 'year' - -const balanceSheetReport = await pool.reports.balanceSheet({ - from: '2024-01-01', - to: '2024-01-31', - groupBy: 'month', -}) -``` - -### Developer Docs - -#### Dev server - -```bash -yarn dev -``` - -#### Build - -```bash -yarn build -``` - -#### Test - -```bash -yarn test -yarn test:single -yarn test:simple:single ## without setup file, faster and without tenderly setup -``` - -#### PR Naming Convention - -PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. - -#### Semantic Versioning - -PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index 3812d1c..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,68 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Interfaces - -- [ReportFilter](#interfaces-reportfilter) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index bd02375..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index 351d069..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index e639971..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index 1af8580..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index 0dceb62..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index dd75bc9..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index 520237a..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index 40d79d4..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index 6a84415..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md deleted file mode 100644 index 538edf7..0000000 --- a/docs/interfaces/_ReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Interface: ReportFilter - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L13) - -### Properties - -#### from? - -> `optional` **from**: `string` - -Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L14) - -*** - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L16) - -*** - -#### to? - -> `optional` **to**: `string` - -Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index 96d5aa9..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index d6a3a99..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index 52bbda8..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index e8ce855..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index 082fc44..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index 7778835..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index e0c115d..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 0eeb6f9..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index 144121a..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index acf35df..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index 672dd17..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index e7684a2..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index cc40158..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index 57626d0..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index 10e715b..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index f5a1056..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 288b7fa..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index 016b932..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index 72446ba..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 24c3c1e..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index 314d9fc..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index 9645379..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index 629d041..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index 7b2dee7..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index ebc1eca..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index a4506f9..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index 658cb2e..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index e02016a..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index af1a8b7..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index 975b3bb..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 2c12e82..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index 694e203..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index 7d8e4e6..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index 78be124..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index 79959a8..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index 2589d0a..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index 81f4707..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index bd917e1..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 7d936dc..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index 352a12c..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index 51bfebc..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/20f6f7405dbfe43e55dbfdf56cb48d163938a551/src/types/transaction.ts#L64) From d97b7f10617e9d4a629261b72a1e5d211ffc580c Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 13:46:22 -0500 Subject: [PATCH 18/42] Use auth url --- .github/ci-scripts/update-sdk-docs.cjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index 46fa94b..e0ab7a4 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -46,7 +46,6 @@ async function main() { const repoUrl = 'https://github.com/centrifuge/sdk-docs.git' await git.clone(repoUrl, './sdk-docs') - // Set Git identity for this repo await git .cwd('./sdk-docs') .addConfig('user.name', 'github-actions[bot]') @@ -65,6 +64,10 @@ async function main() { // Add and commit changes await git.add('.').commit('Update SDK documentation') + // Set the authenticated remote URL before pushing + const authUrl = `https://x-access-token:${process.env.PAT_TOKEN}@github.com/centrifuge/sdk-docs.git` + await git.remote(['set-url', 'origin', authUrl]) + // Push the new branch await git.push('origin', branchName) From 20843ed5c656c598907fcc377c378e170894e8e0 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 13:50:33 -0500 Subject: [PATCH 19/42] oauth for authorization --- .github/ci-scripts/update-sdk-docs.cjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index e0ab7a4..352f84e 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -64,8 +64,7 @@ async function main() { // Add and commit changes await git.add('.').commit('Update SDK documentation') - // Set the authenticated remote URL before pushing - const authUrl = `https://x-access-token:${process.env.PAT_TOKEN}@github.com/centrifuge/sdk-docs.git` + const authUrl = `https://oauth2:${process.env.PAT_TOKEN}@github.com/centrifuge/sdk-docs.git` await git.remote(['set-url', 'origin', authUrl]) // Push the new branch From c380e23f1cef883c29e6fc7474f06d3c621713e4 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 18:50:59 +0000 Subject: [PATCH 20/42] Update docs --- docs/_README.md | 192 +++++++++ docs/_globals.md | 68 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/interfaces/_ReportFilter.md | 28 ++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 53 files changed, 3625 insertions(+) create mode 100644 docs/_README.md create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/interfaces/_ReportFilter.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_README.md b/docs/_README.md new file mode 100644 index 0000000..c8677a5 --- /dev/null +++ b/docs/_README.md @@ -0,0 +1,192 @@ + +## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) + +The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. + +### Installation + +Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. + +```bash +npm install --save @centrifuge/sdk viem +## or +yarn install @centrifuge/sdk viem +``` + +### Init and config + +Create an instance and pass optional configuration + +```js +import Centrifuge from '@centrifuge/sdk' + +const centrifuge = new Centrifuge() +``` + +The following config options can be passed on initialization of the SDK: + +- `environment: 'mainnet' | 'demo' | 'dev'` + - Optional + - Default value: `mainnet` +- `rpcUrls: Record` + - Optional + - A object mapping chain ids to RPC URLs + +### Queries + +Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. + +```js +try { + const pool = await centrifuge.pools() +} catch (error) { + console.error(error) +} +``` + +```js +const subscription = centrifuge.pools().subscribe( + (pool) => console.log(pool), + (error) => console.error(error) +) +subscription.unsubscribe() +``` + +The returned results are either immutable values, or entities that can be further queried. + +### Transactions + +To perform transactions, you need to set a signer on the `centrifuge` instance. + +```js +centrifuge.setSigner(signer) +``` + +`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). + +With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. + +```js +const pool = await centrifuge.pool('1') +try { + const status = await pool.closeEpoch() + console.log(status) +} catch (error) { + console.error(error) +} +``` + +```js +const pool = await centrifuge.pool('1') +const subscription = pool.closeEpoch().subscribe( + (status) => console.log(pool), + (error) => console.error(error), + () => console.log('complete') +) +``` + +### Investments + +Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency + +Retrieve a vault by querying it from the pool: + +```js +const pool = await centrifuge.pool('1') +const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address +``` + +Query the state of an investment on the vault for an investor: + +```js +const investment = await vault.investment('0x123...') +// Will return an object containing: +// isAllowedToInvest - Whether an investor is allowed to invest in the tranche +// investmentCurrency - The ERC20 token that is used to invest in the vault +// investmentCurrencyBalance - The balance of the investor of the investment currency +// investmentCurrencyAllowance - The allowance of the vault +// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche +// shareBalance - The number of shares the investor has in the tranche +// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) +// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency +// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) +// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money +// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet +// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet +// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed +// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed +// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled +// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled +``` + +Invest in a vault: + +```js +const result = await vault.increaseInvestOrder(1000) +console.log(result.hash) +``` + +Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: + +```js +const result = await vault.claim() +``` + +### Reports + +Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. + +Available reports are: + +- `balanceSheet` +- `profitAndLoss` +- `cashflow` + +```ts +const pool = await centrifuge.pool('') +const balanceSheetReport = await pool.reports.balanceSheet() +``` + +#### Report Filtering + +Reports can be filtered using the `ReportFilter` type. + +```ts +type GroupBy = 'day' | 'month' | 'quarter' | 'year' + +const balanceSheetReport = await pool.reports.balanceSheet({ + from: '2024-01-01', + to: '2024-01-31', + groupBy: 'month', +}) +``` + +### Developer Docs + +#### Dev server + +```bash +yarn dev +``` + +#### Build + +```bash +yarn build +``` + +#### Test + +```bash +yarn test +yarn test:single +yarn test:simple:single ## without setup file, faster and without tenderly setup +``` + +#### PR Naming Convention + +PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +#### Semantic Versioning + +PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..3812d1c --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,68 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Interfaces + +- [ReportFilter](#interfaces-reportfilter) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..d14a5ee --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..4160ce4 --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..9b2b29d --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..dc47c33 --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..40ebb29 --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..aab376b --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..71fed7f --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..d2d8269 --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..ca4c42c --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md new file mode 100644 index 0000000..393430f --- /dev/null +++ b/docs/interfaces/_ReportFilter.md @@ -0,0 +1,28 @@ + +## Interface: ReportFilter + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L13) + +### Properties + +#### from? + +> `optional` **from**: `string` + +Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L14) + +*** + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L16) + +*** + +#### to? + +> `optional` **to**: `string` + +Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..bf0feba --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..cd2c4b7 --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..6233c56 --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..a35f4fa --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..e8c7025 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..bc07dc7 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..5596917 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..320effc --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..36b24b1 --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..e36cf59 --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..dd7b82e --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..ec20927 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..ab10bdf --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..4e740c1 --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..de09473 --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..3c38b68 --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..685c6a1 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..bb6b70a --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..b44a6a2 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..604e40e --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..c6de3ab --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..317215e --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..6a4ae5d --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..f7360b3 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..43dbd8e --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..bd291c9 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..219d7ed --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..9714443 --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..a5afd45 --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..08b6206 --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..9018800 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..8c25595 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..ca7e840 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..28ce77d --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..3e9d32f --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..16770b1 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..a707591 --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..af3a635 --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..d0e84b3 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..62914e3 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..5edfd18 --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L64) From 8477ffdb69b2e9c2826629c901f831a9c86b0a57 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 13:53:52 -0500 Subject: [PATCH 21/42] Regular auth? --- .github/ci-scripts/update-sdk-docs.cjs | 2 +- docs/_README.md | 192 --------- docs/_globals.md | 68 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/interfaces/_ReportFilter.md | 28 -- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - 54 files changed, 1 insertion(+), 3626 deletions(-) delete mode 100644 docs/_README.md delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/interfaces/_ReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index 352f84e..72b6417 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -64,7 +64,7 @@ async function main() { // Add and commit changes await git.add('.').commit('Update SDK documentation') - const authUrl = `https://oauth2:${process.env.PAT_TOKEN}@github.com/centrifuge/sdk-docs.git` + const authUrl = `https://${process.env.PAT_TOKEN}@github.com/centrifuge/sdk-docs.git` await git.remote(['set-url', 'origin', authUrl]) // Push the new branch diff --git a/docs/_README.md b/docs/_README.md deleted file mode 100644 index c8677a5..0000000 --- a/docs/_README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) - -The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. - -### Installation - -Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. - -```bash -npm install --save @centrifuge/sdk viem -## or -yarn install @centrifuge/sdk viem -``` - -### Init and config - -Create an instance and pass optional configuration - -```js -import Centrifuge from '@centrifuge/sdk' - -const centrifuge = new Centrifuge() -``` - -The following config options can be passed on initialization of the SDK: - -- `environment: 'mainnet' | 'demo' | 'dev'` - - Optional - - Default value: `mainnet` -- `rpcUrls: Record` - - Optional - - A object mapping chain ids to RPC URLs - -### Queries - -Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. - -```js -try { - const pool = await centrifuge.pools() -} catch (error) { - console.error(error) -} -``` - -```js -const subscription = centrifuge.pools().subscribe( - (pool) => console.log(pool), - (error) => console.error(error) -) -subscription.unsubscribe() -``` - -The returned results are either immutable values, or entities that can be further queried. - -### Transactions - -To perform transactions, you need to set a signer on the `centrifuge` instance. - -```js -centrifuge.setSigner(signer) -``` - -`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). - -With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. - -```js -const pool = await centrifuge.pool('1') -try { - const status = await pool.closeEpoch() - console.log(status) -} catch (error) { - console.error(error) -} -``` - -```js -const pool = await centrifuge.pool('1') -const subscription = pool.closeEpoch().subscribe( - (status) => console.log(pool), - (error) => console.error(error), - () => console.log('complete') -) -``` - -### Investments - -Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency - -Retrieve a vault by querying it from the pool: - -```js -const pool = await centrifuge.pool('1') -const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address -``` - -Query the state of an investment on the vault for an investor: - -```js -const investment = await vault.investment('0x123...') -// Will return an object containing: -// isAllowedToInvest - Whether an investor is allowed to invest in the tranche -// investmentCurrency - The ERC20 token that is used to invest in the vault -// investmentCurrencyBalance - The balance of the investor of the investment currency -// investmentCurrencyAllowance - The allowance of the vault -// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche -// shareBalance - The number of shares the investor has in the tranche -// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) -// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency -// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) -// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money -// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet -// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet -// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed -// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed -// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled -// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled -``` - -Invest in a vault: - -```js -const result = await vault.increaseInvestOrder(1000) -console.log(result.hash) -``` - -Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: - -```js -const result = await vault.claim() -``` - -### Reports - -Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. - -Available reports are: - -- `balanceSheet` -- `profitAndLoss` -- `cashflow` - -```ts -const pool = await centrifuge.pool('') -const balanceSheetReport = await pool.reports.balanceSheet() -``` - -#### Report Filtering - -Reports can be filtered using the `ReportFilter` type. - -```ts -type GroupBy = 'day' | 'month' | 'quarter' | 'year' - -const balanceSheetReport = await pool.reports.balanceSheet({ - from: '2024-01-01', - to: '2024-01-31', - groupBy: 'month', -}) -``` - -### Developer Docs - -#### Dev server - -```bash -yarn dev -``` - -#### Build - -```bash -yarn build -``` - -#### Test - -```bash -yarn test -yarn test:single -yarn test:simple:single ## without setup file, faster and without tenderly setup -``` - -#### PR Naming Convention - -PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. - -#### Semantic Versioning - -PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index 3812d1c..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,68 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Interfaces - -- [ReportFilter](#interfaces-reportfilter) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index d14a5ee..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index 4160ce4..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index 9b2b29d..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index dc47c33..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index 40ebb29..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index aab376b..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index 71fed7f..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index d2d8269..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index ca4c42c..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md deleted file mode 100644 index 393430f..0000000 --- a/docs/interfaces/_ReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Interface: ReportFilter - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L13) - -### Properties - -#### from? - -> `optional` **from**: `string` - -Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L14) - -*** - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L16) - -*** - -#### to? - -> `optional` **to**: `string` - -Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index bf0feba..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index cd2c4b7..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index 6233c56..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index a35f4fa..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index e8c7025..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index bc07dc7..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index 5596917..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 320effc..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index 36b24b1..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index e36cf59..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index dd7b82e..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index ec20927..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index ab10bdf..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index 4e740c1..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index de09473..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index 3c38b68..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 685c6a1..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index bb6b70a..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index b44a6a2..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 604e40e..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index c6de3ab..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index 317215e..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index 6a4ae5d..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index f7360b3..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index 43dbd8e..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index bd291c9..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index 219d7ed..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index 9714443..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index a5afd45..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index 08b6206..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 9018800..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index 8c25595..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index ca7e840..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index 28ce77d..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index 3e9d32f..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index 16770b1..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index a707591..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index af3a635..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index d0e84b3..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index 62914e3..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index 5edfd18..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/20843ed5c656c598907fcc377c378e170894e8e0/src/types/transaction.ts#L64) From 53d114090a2f30046959761b9bf8f6f2a6b15867 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 13:55:25 -0500 Subject: [PATCH 22/42] Fix naming --- .github/workflows/update-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index a8ff74f..0b28d49 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -59,5 +59,5 @@ jobs: - name: Update docs if: steps.commit_check.outputs.has_changes == 'true' env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} run: node ./.github/ci-scripts/update-sdk-docs.cjs From f6a84e5841d8df049ae968dc9f213c411f211272 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 18:55:56 +0000 Subject: [PATCH 23/42] Update docs --- docs/_README.md | 192 +++++++++ docs/_globals.md | 68 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/interfaces/_ReportFilter.md | 28 ++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 53 files changed, 3625 insertions(+) create mode 100644 docs/_README.md create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/interfaces/_ReportFilter.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_README.md b/docs/_README.md new file mode 100644 index 0000000..c8677a5 --- /dev/null +++ b/docs/_README.md @@ -0,0 +1,192 @@ + +## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) + +The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. + +### Installation + +Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. + +```bash +npm install --save @centrifuge/sdk viem +## or +yarn install @centrifuge/sdk viem +``` + +### Init and config + +Create an instance and pass optional configuration + +```js +import Centrifuge from '@centrifuge/sdk' + +const centrifuge = new Centrifuge() +``` + +The following config options can be passed on initialization of the SDK: + +- `environment: 'mainnet' | 'demo' | 'dev'` + - Optional + - Default value: `mainnet` +- `rpcUrls: Record` + - Optional + - A object mapping chain ids to RPC URLs + +### Queries + +Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. + +```js +try { + const pool = await centrifuge.pools() +} catch (error) { + console.error(error) +} +``` + +```js +const subscription = centrifuge.pools().subscribe( + (pool) => console.log(pool), + (error) => console.error(error) +) +subscription.unsubscribe() +``` + +The returned results are either immutable values, or entities that can be further queried. + +### Transactions + +To perform transactions, you need to set a signer on the `centrifuge` instance. + +```js +centrifuge.setSigner(signer) +``` + +`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). + +With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. + +```js +const pool = await centrifuge.pool('1') +try { + const status = await pool.closeEpoch() + console.log(status) +} catch (error) { + console.error(error) +} +``` + +```js +const pool = await centrifuge.pool('1') +const subscription = pool.closeEpoch().subscribe( + (status) => console.log(pool), + (error) => console.error(error), + () => console.log('complete') +) +``` + +### Investments + +Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency + +Retrieve a vault by querying it from the pool: + +```js +const pool = await centrifuge.pool('1') +const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address +``` + +Query the state of an investment on the vault for an investor: + +```js +const investment = await vault.investment('0x123...') +// Will return an object containing: +// isAllowedToInvest - Whether an investor is allowed to invest in the tranche +// investmentCurrency - The ERC20 token that is used to invest in the vault +// investmentCurrencyBalance - The balance of the investor of the investment currency +// investmentCurrencyAllowance - The allowance of the vault +// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche +// shareBalance - The number of shares the investor has in the tranche +// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) +// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency +// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) +// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money +// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet +// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet +// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed +// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed +// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled +// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled +``` + +Invest in a vault: + +```js +const result = await vault.increaseInvestOrder(1000) +console.log(result.hash) +``` + +Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: + +```js +const result = await vault.claim() +``` + +### Reports + +Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. + +Available reports are: + +- `balanceSheet` +- `profitAndLoss` +- `cashflow` + +```ts +const pool = await centrifuge.pool('') +const balanceSheetReport = await pool.reports.balanceSheet() +``` + +#### Report Filtering + +Reports can be filtered using the `ReportFilter` type. + +```ts +type GroupBy = 'day' | 'month' | 'quarter' | 'year' + +const balanceSheetReport = await pool.reports.balanceSheet({ + from: '2024-01-01', + to: '2024-01-31', + groupBy: 'month', +}) +``` + +### Developer Docs + +#### Dev server + +```bash +yarn dev +``` + +#### Build + +```bash +yarn build +``` + +#### Test + +```bash +yarn test +yarn test:single +yarn test:simple:single ## without setup file, faster and without tenderly setup +``` + +#### PR Naming Convention + +PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +#### Semantic Versioning + +PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..3812d1c --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,68 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Interfaces + +- [ReportFilter](#interfaces-reportfilter) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..39bed82 --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..707e10b --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..76ff6fa --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..9c4f98f --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..fd1bea6 --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..6e7b6ad --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..2566bca --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..d12c490 --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#interfaces-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..83923fd --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md new file mode 100644 index 0000000..2ce4d5b --- /dev/null +++ b/docs/interfaces/_ReportFilter.md @@ -0,0 +1,28 @@ + +## Interface: ReportFilter + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L13) + +### Properties + +#### from? + +> `optional` **from**: `string` + +Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L14) + +*** + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L16) + +*** + +#### to? + +> `optional` **to**: `string` + +Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..74a0179 --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..def024a --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..bc19a22 --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..535b72b --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..e2908d2 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..0a1504d --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..b36fc9f --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..3b5cd2f --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..eed6a91 --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..d55432f --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..37f28e0 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..3dedb42 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..5d7fe09 --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..5755457 --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..e9b3c49 --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..b7e1275 --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..89e8b23 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..c31d4c8 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..d68ea43 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..85e2eae --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..f796610 --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..ab9e690 --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..a7cea13 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..985d77b --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..c4d63d4 --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..5f42050 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..5a06386 --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..7d7dfc2 --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..af8d133 --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..fe3d3a0 --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..12be059 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..8a234e4 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..fc0ee4d --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..8e47689 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..5d12576 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..2ef7c70 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..d34850c --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..1a06944 --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..9fb8344 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..2f23c14 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..5b07d08 --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L64) From 06481dd97d36d4bab50ba6896f271ad18817fe4b Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 17:03:52 -0500 Subject: [PATCH 24/42] Exclude readme and improve copy --- .github/ci-scripts/update-sdk-docs.cjs | 14 +- .github/workflows/update-docs.yml | 2 +- docs/_README.md | 192 --------- docs/_globals.md | 68 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/interfaces/_ReportFilter.md | 28 -- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - src/types/reports.ts | 2 +- 56 files changed, 13 insertions(+), 3630 deletions(-) delete mode 100644 docs/_README.md delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/interfaces/_ReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index 72b6417..40a4369 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -24,6 +24,13 @@ async function copyDocs(sourceDir, targetDir) { // Copy each file to the target directory, maintaining directory structure for (const file of docFiles) { const relativePath = path.relative(sourceDir, file) + + // Skip README.md + if (path.basename(file) === 'README.md') { + console.log('Skipping README.md') + continue + } + const targetPath = path.join(targetDir, relativePath) // Create the nested directory structure if it doesn't exist @@ -41,8 +48,8 @@ async function copyDocs(sourceDir, targetDir) { async function main() { try { - // Clone the SDK docs repo const git = simpleGit() + // Clone the SDK docs repo const repoUrl = 'https://github.com/centrifuge/sdk-docs.git' await git.clone(repoUrl, './sdk-docs') @@ -71,8 +78,9 @@ async function main() { await git.push('origin', branchName) // Create PR using GitHub CLI - const prTitle = 'Update SDK Documentation' - const prBody = 'Automated PR to update SDK documentation' + const prTitle = '[sdk:ci:bot]Update SDK Documentation' + const prBody = + '[sdk:ci:bot] Automated PR to update SDK documentation: [Actions](https://github.com/centrifuge/sdk/actions/workflows/update-docs.yml)' const prCommand = `gh pr create \ --title "${prTitle}" \ --body "${prBody}" \ diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 0b28d49..3de6a8f 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -37,7 +37,7 @@ jobs: git config user.email "actions@github.com" if [[ -n "$(git status --porcelain docs)" ]]; then git add docs - git commit -m "Update docs" + git commit -m "[ci:bot] Update docs" echo "has_changes=true" >> "$GITHUB_OUTPUT" else echo "has_changes=false" >> "$GITHUB_OUTPUT" diff --git a/docs/_README.md b/docs/_README.md deleted file mode 100644 index c8677a5..0000000 --- a/docs/_README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) - -The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. - -### Installation - -Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. - -```bash -npm install --save @centrifuge/sdk viem -## or -yarn install @centrifuge/sdk viem -``` - -### Init and config - -Create an instance and pass optional configuration - -```js -import Centrifuge from '@centrifuge/sdk' - -const centrifuge = new Centrifuge() -``` - -The following config options can be passed on initialization of the SDK: - -- `environment: 'mainnet' | 'demo' | 'dev'` - - Optional - - Default value: `mainnet` -- `rpcUrls: Record` - - Optional - - A object mapping chain ids to RPC URLs - -### Queries - -Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. - -```js -try { - const pool = await centrifuge.pools() -} catch (error) { - console.error(error) -} -``` - -```js -const subscription = centrifuge.pools().subscribe( - (pool) => console.log(pool), - (error) => console.error(error) -) -subscription.unsubscribe() -``` - -The returned results are either immutable values, or entities that can be further queried. - -### Transactions - -To perform transactions, you need to set a signer on the `centrifuge` instance. - -```js -centrifuge.setSigner(signer) -``` - -`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). - -With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. - -```js -const pool = await centrifuge.pool('1') -try { - const status = await pool.closeEpoch() - console.log(status) -} catch (error) { - console.error(error) -} -``` - -```js -const pool = await centrifuge.pool('1') -const subscription = pool.closeEpoch().subscribe( - (status) => console.log(pool), - (error) => console.error(error), - () => console.log('complete') -) -``` - -### Investments - -Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency - -Retrieve a vault by querying it from the pool: - -```js -const pool = await centrifuge.pool('1') -const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address -``` - -Query the state of an investment on the vault for an investor: - -```js -const investment = await vault.investment('0x123...') -// Will return an object containing: -// isAllowedToInvest - Whether an investor is allowed to invest in the tranche -// investmentCurrency - The ERC20 token that is used to invest in the vault -// investmentCurrencyBalance - The balance of the investor of the investment currency -// investmentCurrencyAllowance - The allowance of the vault -// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche -// shareBalance - The number of shares the investor has in the tranche -// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) -// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency -// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) -// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money -// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet -// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet -// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed -// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed -// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled -// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled -``` - -Invest in a vault: - -```js -const result = await vault.increaseInvestOrder(1000) -console.log(result.hash) -``` - -Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: - -```js -const result = await vault.claim() -``` - -### Reports - -Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. - -Available reports are: - -- `balanceSheet` -- `profitAndLoss` -- `cashflow` - -```ts -const pool = await centrifuge.pool('') -const balanceSheetReport = await pool.reports.balanceSheet() -``` - -#### Report Filtering - -Reports can be filtered using the `ReportFilter` type. - -```ts -type GroupBy = 'day' | 'month' | 'quarter' | 'year' - -const balanceSheetReport = await pool.reports.balanceSheet({ - from: '2024-01-01', - to: '2024-01-31', - groupBy: 'month', -}) -``` - -### Developer Docs - -#### Dev server - -```bash -yarn dev -``` - -#### Build - -```bash -yarn build -``` - -#### Test - -```bash -yarn test -yarn test:single -yarn test:simple:single ## without setup file, faster and without tenderly setup -``` - -#### PR Naming Convention - -PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. - -#### Semantic Versioning - -PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index 3812d1c..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,68 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Interfaces - -- [ReportFilter](#interfaces-reportfilter) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index 39bed82..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index 707e10b..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index 76ff6fa..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index 9c4f98f..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index fd1bea6..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index 6e7b6ad..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index 2566bca..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index d12c490..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#interfaces-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index 83923fd..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/interfaces/_ReportFilter.md b/docs/interfaces/_ReportFilter.md deleted file mode 100644 index 2ce4d5b..0000000 --- a/docs/interfaces/_ReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Interface: ReportFilter - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L13) - -### Properties - -#### from? - -> `optional` **from**: `string` - -Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L14) - -*** - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L16) - -*** - -#### to? - -> `optional` **to**: `string` - -Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L15) diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index 74a0179..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index def024a..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index bc19a22..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index 535b72b..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index e2908d2..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index 0a1504d..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index b36fc9f..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 3b5cd2f..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index eed6a91..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index d55432f..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index 37f28e0..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index 3dedb42..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index 5d7fe09..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index 5755457..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index e9b3c49..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index b7e1275..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 89e8b23..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index c31d4c8..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index d68ea43..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 85e2eae..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index f796610..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index ab9e690..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index a7cea13..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index 985d77b..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index c4d63d4..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index 5f42050..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index 5a06386..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index 7d7dfc2..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index af8d133..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index fe3d3a0..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 12be059..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index 8a234e4..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index fc0ee4d..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index 8e47689..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index 5d12576..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index 2ef7c70..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index d34850c..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index 1a06944..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 9fb8344..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index 2f23c14..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index 5b07d08..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/53d114090a2f30046959761b9bf8f6f2a6b15867/src/types/transaction.ts#L64) diff --git a/src/types/reports.ts b/src/types/reports.ts index c2a359a..42db0b8 100644 --- a/src/types/reports.ts +++ b/src/types/reports.ts @@ -10,7 +10,7 @@ import { PoolMetadata } from '../types/poolMetadata.js' import { Currency, Price, Rate, Token } from '../utils/BigInt.js' import { GroupBy } from '../utils/date.js' -export interface ReportFilter { +export type ReportFilter = { from?: string to?: string groupBy?: GroupBy From 2da740f5088ebd8f99e1c9bca19a91c6ab089493 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 22:04:28 +0000 Subject: [PATCH 25/42] [ci:bot] Update docs --- docs/_README.md | 192 +++++++++ docs/_globals.md | 65 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_ReportFilter.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 53 files changed, 3614 insertions(+) create mode 100644 docs/_README.md create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_ReportFilter.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_README.md b/docs/_README.md new file mode 100644 index 0000000..c8677a5 --- /dev/null +++ b/docs/_README.md @@ -0,0 +1,192 @@ + +## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) + +The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. + +### Installation + +Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. + +```bash +npm install --save @centrifuge/sdk viem +## or +yarn install @centrifuge/sdk viem +``` + +### Init and config + +Create an instance and pass optional configuration + +```js +import Centrifuge from '@centrifuge/sdk' + +const centrifuge = new Centrifuge() +``` + +The following config options can be passed on initialization of the SDK: + +- `environment: 'mainnet' | 'demo' | 'dev'` + - Optional + - Default value: `mainnet` +- `rpcUrls: Record` + - Optional + - A object mapping chain ids to RPC URLs + +### Queries + +Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. + +```js +try { + const pool = await centrifuge.pools() +} catch (error) { + console.error(error) +} +``` + +```js +const subscription = centrifuge.pools().subscribe( + (pool) => console.log(pool), + (error) => console.error(error) +) +subscription.unsubscribe() +``` + +The returned results are either immutable values, or entities that can be further queried. + +### Transactions + +To perform transactions, you need to set a signer on the `centrifuge` instance. + +```js +centrifuge.setSigner(signer) +``` + +`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). + +With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. + +```js +const pool = await centrifuge.pool('1') +try { + const status = await pool.closeEpoch() + console.log(status) +} catch (error) { + console.error(error) +} +``` + +```js +const pool = await centrifuge.pool('1') +const subscription = pool.closeEpoch().subscribe( + (status) => console.log(pool), + (error) => console.error(error), + () => console.log('complete') +) +``` + +### Investments + +Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency + +Retrieve a vault by querying it from the pool: + +```js +const pool = await centrifuge.pool('1') +const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address +``` + +Query the state of an investment on the vault for an investor: + +```js +const investment = await vault.investment('0x123...') +// Will return an object containing: +// isAllowedToInvest - Whether an investor is allowed to invest in the tranche +// investmentCurrency - The ERC20 token that is used to invest in the vault +// investmentCurrencyBalance - The balance of the investor of the investment currency +// investmentCurrencyAllowance - The allowance of the vault +// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche +// shareBalance - The number of shares the investor has in the tranche +// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) +// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency +// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) +// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money +// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet +// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet +// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed +// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed +// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled +// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled +``` + +Invest in a vault: + +```js +const result = await vault.increaseInvestOrder(1000) +console.log(result.hash) +``` + +Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: + +```js +const result = await vault.claim() +``` + +### Reports + +Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. + +Available reports are: + +- `balanceSheet` +- `profitAndLoss` +- `cashflow` + +```ts +const pool = await centrifuge.pool('') +const balanceSheetReport = await pool.reports.balanceSheet() +``` + +#### Report Filtering + +Reports can be filtered using the `ReportFilter` type. + +```ts +type GroupBy = 'day' | 'month' | 'quarter' | 'year' + +const balanceSheetReport = await pool.reports.balanceSheet({ + from: '2024-01-01', + to: '2024-01-31', + groupBy: 'month', +}) +``` + +### Developer Docs + +#### Dev server + +```bash +yarn dev +``` + +#### Build + +```bash +yarn build +``` + +#### Test + +```bash +yarn test +yarn test:single +yarn test:simple:single ## without setup file, faster and without tenderly setup +``` + +#### PR Naming Convention + +PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +#### Semantic Versioning + +PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..c00ffe9 --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,65 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [ReportFilter](#type-reportfilter) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..dc20595 --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..a24f5ec --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..80de8bc --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..50d7fe4 --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..3b08ae9 --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..e5ea56a --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..cb13179 --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..23ebda5 --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..4561ad6 --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..077a7a6 --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..f4d8dea --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..b488ea9 --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..4f5e570 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..cbb8736 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..a3abd42 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..44efb02 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..999fbcf --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..8c03dbe --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..4fd785e --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..e457815 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..9c1bdd6 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..ce634c3 --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..e632747 --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..c20b786 --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..329f20e --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..90be7df --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..75d4adb --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..5e4a6d7 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..6ce8fe2 --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..4c05efb --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..f57199e --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..57aa078 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..b534f60 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..965035e --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..35e80ff --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..5fe4ead --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..9ba2552 --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..3ed9c78 --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..e481e05 --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..9c90733 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..915a2c8 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..f0d7ec0 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..136a153 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..46c8eff --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..c3bec9f --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..f61d391 --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md new file mode 100644 index 0000000..04d3e44 --- /dev/null +++ b/docs/type-aliases/_ReportFilter.md @@ -0,0 +1,20 @@ + +## Type: ReportFilter + +> **ReportFilter**: `object` + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L13) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..16ccc42 --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..103263a --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..b329506 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..c152fb8 --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L64) From 5924ed586d0e61ad527b0c53333be0f2d6e0ea5a Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 17:11:04 -0500 Subject: [PATCH 26/42] Unique branch names and earlier auth --- .github/ci-scripts/update-sdk-docs.cjs | 11 +- docs/_README.md | 192 --------- docs/_globals.md | 65 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_ReportFilter.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - 54 files changed, 4 insertions(+), 3621 deletions(-) delete mode 100644 docs/_README.md delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_ReportFilter.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index 40a4369..a11ea03 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -50,8 +50,8 @@ async function main() { try { const git = simpleGit() // Clone the SDK docs repo - const repoUrl = 'https://github.com/centrifuge/sdk-docs.git' - await git.clone(repoUrl, './sdk-docs') + const repoUrl = `https://${process.env.PAT_TOKEN}@github.com/centrifuge/sdk-docs.git` + await git.clone(repoUrl) await git .cwd('./sdk-docs') @@ -65,20 +65,17 @@ async function main() { ) // Create and switch to a new branch - const branchName = `docs-update-${new Date().toISOString().split('T')[0]}` + const branchName = `docs-update-${new Date().toISOString().slice(0, 19).replace('T', '-')}` await git.checkoutLocalBranch(branchName) // Add and commit changes await git.add('.').commit('Update SDK documentation') - const authUrl = `https://${process.env.PAT_TOKEN}@github.com/centrifuge/sdk-docs.git` - await git.remote(['set-url', 'origin', authUrl]) - // Push the new branch await git.push('origin', branchName) // Create PR using GitHub CLI - const prTitle = '[sdk:ci:bot]Update SDK Documentation' + const prTitle = '[sdk:ci:bot] Update SDK Documentation' const prBody = '[sdk:ci:bot] Automated PR to update SDK documentation: [Actions](https://github.com/centrifuge/sdk/actions/workflows/update-docs.yml)' const prCommand = `gh pr create \ diff --git a/docs/_README.md b/docs/_README.md deleted file mode 100644 index c8677a5..0000000 --- a/docs/_README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) - -The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. - -### Installation - -Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. - -```bash -npm install --save @centrifuge/sdk viem -## or -yarn install @centrifuge/sdk viem -``` - -### Init and config - -Create an instance and pass optional configuration - -```js -import Centrifuge from '@centrifuge/sdk' - -const centrifuge = new Centrifuge() -``` - -The following config options can be passed on initialization of the SDK: - -- `environment: 'mainnet' | 'demo' | 'dev'` - - Optional - - Default value: `mainnet` -- `rpcUrls: Record` - - Optional - - A object mapping chain ids to RPC URLs - -### Queries - -Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. - -```js -try { - const pool = await centrifuge.pools() -} catch (error) { - console.error(error) -} -``` - -```js -const subscription = centrifuge.pools().subscribe( - (pool) => console.log(pool), - (error) => console.error(error) -) -subscription.unsubscribe() -``` - -The returned results are either immutable values, or entities that can be further queried. - -### Transactions - -To perform transactions, you need to set a signer on the `centrifuge` instance. - -```js -centrifuge.setSigner(signer) -``` - -`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). - -With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. - -```js -const pool = await centrifuge.pool('1') -try { - const status = await pool.closeEpoch() - console.log(status) -} catch (error) { - console.error(error) -} -``` - -```js -const pool = await centrifuge.pool('1') -const subscription = pool.closeEpoch().subscribe( - (status) => console.log(pool), - (error) => console.error(error), - () => console.log('complete') -) -``` - -### Investments - -Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency - -Retrieve a vault by querying it from the pool: - -```js -const pool = await centrifuge.pool('1') -const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address -``` - -Query the state of an investment on the vault for an investor: - -```js -const investment = await vault.investment('0x123...') -// Will return an object containing: -// isAllowedToInvest - Whether an investor is allowed to invest in the tranche -// investmentCurrency - The ERC20 token that is used to invest in the vault -// investmentCurrencyBalance - The balance of the investor of the investment currency -// investmentCurrencyAllowance - The allowance of the vault -// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche -// shareBalance - The number of shares the investor has in the tranche -// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) -// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency -// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) -// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money -// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet -// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet -// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed -// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed -// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled -// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled -``` - -Invest in a vault: - -```js -const result = await vault.increaseInvestOrder(1000) -console.log(result.hash) -``` - -Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: - -```js -const result = await vault.claim() -``` - -### Reports - -Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. - -Available reports are: - -- `balanceSheet` -- `profitAndLoss` -- `cashflow` - -```ts -const pool = await centrifuge.pool('') -const balanceSheetReport = await pool.reports.balanceSheet() -``` - -#### Report Filtering - -Reports can be filtered using the `ReportFilter` type. - -```ts -type GroupBy = 'day' | 'month' | 'quarter' | 'year' - -const balanceSheetReport = await pool.reports.balanceSheet({ - from: '2024-01-01', - to: '2024-01-31', - groupBy: 'month', -}) -``` - -### Developer Docs - -#### Dev server - -```bash -yarn dev -``` - -#### Build - -```bash -yarn build -``` - -#### Test - -```bash -yarn test -yarn test:single -yarn test:simple:single ## without setup file, faster and without tenderly setup -``` - -#### PR Naming Convention - -PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. - -#### Semantic Versioning - -PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index c00ffe9..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,65 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [ReportFilter](#type-reportfilter) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index dc20595..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index a24f5ec..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index 80de8bc..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index 50d7fe4..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index 3b08ae9..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index e5ea56a..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index cb13179..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index 23ebda5..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index 4561ad6..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index 077a7a6..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index f4d8dea..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index b488ea9..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index 4f5e570..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index cbb8736..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index a3abd42..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index 44efb02..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 999fbcf..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index 8c03dbe..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index 4fd785e..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index e457815..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index 9c1bdd6..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index ce634c3..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index e632747..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index c20b786..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index 329f20e..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 90be7df..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index 75d4adb..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index 5e4a6d7..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 6ce8fe2..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index 4c05efb..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index f57199e..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index 57aa078..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index b534f60..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index 965035e..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index 35e80ff..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index 5fe4ead..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index 9ba2552..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index 3ed9c78..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index e481e05..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 9c90733..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index 915a2c8..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index f0d7ec0..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index 136a153..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index 46c8eff..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index c3bec9f..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index f61d391..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md deleted file mode 100644 index 04d3e44..0000000 --- a/docs/type-aliases/_ReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ReportFilter - -> **ReportFilter**: `object` - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L13) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index 16ccc42..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 103263a..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index b329506..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index c152fb8..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/06481dd97d36d4bab50ba6896f271ad18817fe4b/src/types/transaction.ts#L64) From e6c77e43a7e27a4686d0304b8adf3852d5c0b037 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 22:11:32 +0000 Subject: [PATCH 27/42] [ci:bot] Update docs --- docs/_README.md | 192 +++++++++ docs/_globals.md | 65 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_ReportFilter.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 53 files changed, 3614 insertions(+) create mode 100644 docs/_README.md create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_ReportFilter.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_README.md b/docs/_README.md new file mode 100644 index 0000000..c8677a5 --- /dev/null +++ b/docs/_README.md @@ -0,0 +1,192 @@ + +## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) + +The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. + +### Installation + +Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. + +```bash +npm install --save @centrifuge/sdk viem +## or +yarn install @centrifuge/sdk viem +``` + +### Init and config + +Create an instance and pass optional configuration + +```js +import Centrifuge from '@centrifuge/sdk' + +const centrifuge = new Centrifuge() +``` + +The following config options can be passed on initialization of the SDK: + +- `environment: 'mainnet' | 'demo' | 'dev'` + - Optional + - Default value: `mainnet` +- `rpcUrls: Record` + - Optional + - A object mapping chain ids to RPC URLs + +### Queries + +Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. + +```js +try { + const pool = await centrifuge.pools() +} catch (error) { + console.error(error) +} +``` + +```js +const subscription = centrifuge.pools().subscribe( + (pool) => console.log(pool), + (error) => console.error(error) +) +subscription.unsubscribe() +``` + +The returned results are either immutable values, or entities that can be further queried. + +### Transactions + +To perform transactions, you need to set a signer on the `centrifuge` instance. + +```js +centrifuge.setSigner(signer) +``` + +`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). + +With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. + +```js +const pool = await centrifuge.pool('1') +try { + const status = await pool.closeEpoch() + console.log(status) +} catch (error) { + console.error(error) +} +``` + +```js +const pool = await centrifuge.pool('1') +const subscription = pool.closeEpoch().subscribe( + (status) => console.log(pool), + (error) => console.error(error), + () => console.log('complete') +) +``` + +### Investments + +Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency + +Retrieve a vault by querying it from the pool: + +```js +const pool = await centrifuge.pool('1') +const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address +``` + +Query the state of an investment on the vault for an investor: + +```js +const investment = await vault.investment('0x123...') +// Will return an object containing: +// isAllowedToInvest - Whether an investor is allowed to invest in the tranche +// investmentCurrency - The ERC20 token that is used to invest in the vault +// investmentCurrencyBalance - The balance of the investor of the investment currency +// investmentCurrencyAllowance - The allowance of the vault +// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche +// shareBalance - The number of shares the investor has in the tranche +// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) +// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency +// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) +// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money +// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet +// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet +// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed +// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed +// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled +// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled +``` + +Invest in a vault: + +```js +const result = await vault.increaseInvestOrder(1000) +console.log(result.hash) +``` + +Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: + +```js +const result = await vault.claim() +``` + +### Reports + +Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. + +Available reports are: + +- `balanceSheet` +- `profitAndLoss` +- `cashflow` + +```ts +const pool = await centrifuge.pool('') +const balanceSheetReport = await pool.reports.balanceSheet() +``` + +#### Report Filtering + +Reports can be filtered using the `ReportFilter` type. + +```ts +type GroupBy = 'day' | 'month' | 'quarter' | 'year' + +const balanceSheetReport = await pool.reports.balanceSheet({ + from: '2024-01-01', + to: '2024-01-31', + groupBy: 'month', +}) +``` + +### Developer Docs + +#### Dev server + +```bash +yarn dev +``` + +#### Build + +```bash +yarn build +``` + +#### Test + +```bash +yarn test +yarn test:single +yarn test:simple:single ## without setup file, faster and without tenderly setup +``` + +#### PR Naming Convention + +PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +#### Semantic Versioning + +PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..c00ffe9 --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,65 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [ReportFilter](#type-reportfilter) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..4bd8f6c --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..bf2b0e0 --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..b0183e0 --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..d7f3361 --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..e4b3af5 --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..67a6765 --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..db585a9 --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..3c0e69f --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..dfdc10b --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..72780f1 --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..520204c --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..968168a --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..cda07b5 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..89054cc --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..40d3425 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..94d521f --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..16ada07 --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..59dd528 --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..692fd02 --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..0af51a5 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..4b084ec --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..6a9e892 --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..be9e3d7 --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..f867b2f --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..eb4ef02 --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..6871cbc --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..a6a5048 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..357f054 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..567c669 --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..7949cea --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..38e9234 --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..14d8f0b --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..90fa469 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..080299a --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..b5583d9 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..5206bf7 --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..abdb422 --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..4a398ef --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..44ae6a0 --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..32222fc --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..e06a512 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..35f23fb --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..d2d132a --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..95ee293 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..b61c487 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..8664532 --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md new file mode 100644 index 0000000..c5758a3 --- /dev/null +++ b/docs/type-aliases/_ReportFilter.md @@ -0,0 +1,20 @@ + +## Type: ReportFilter + +> **ReportFilter**: `object` + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L13) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..8192424 --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..70be558 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..c6c0e6b --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..a3e3c32 --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L64) From 212732e73f25bd4510d6678f3b949dc7a9984e80 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 17:13:40 -0500 Subject: [PATCH 28/42] Fix branch name --- .github/ci-scripts/update-sdk-docs.cjs | 4 +- docs/_README.md | 192 --------- docs/_globals.md | 65 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_ReportFilter.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - 54 files changed, 2 insertions(+), 3616 deletions(-) delete mode 100644 docs/_README.md delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_ReportFilter.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index a11ea03..7d52e03 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -64,8 +64,8 @@ async function main() { './sdk-docs/source/includes' // target directory ) - // Create and switch to a new branch - const branchName = `docs-update-${new Date().toISOString().slice(0, 19).replace('T', '-')}` + // Create and switch to a new branch (docs-update-YYYY-MM-DD-HH-mm-ss) + const branchName = `docs-update-${new Date().toISOString().slice(0, 19).replace(/[:-]/g, '').replace(' ', '-')}` await git.checkoutLocalBranch(branchName) // Add and commit changes diff --git a/docs/_README.md b/docs/_README.md deleted file mode 100644 index c8677a5..0000000 --- a/docs/_README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) - -The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. - -### Installation - -Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. - -```bash -npm install --save @centrifuge/sdk viem -## or -yarn install @centrifuge/sdk viem -``` - -### Init and config - -Create an instance and pass optional configuration - -```js -import Centrifuge from '@centrifuge/sdk' - -const centrifuge = new Centrifuge() -``` - -The following config options can be passed on initialization of the SDK: - -- `environment: 'mainnet' | 'demo' | 'dev'` - - Optional - - Default value: `mainnet` -- `rpcUrls: Record` - - Optional - - A object mapping chain ids to RPC URLs - -### Queries - -Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. - -```js -try { - const pool = await centrifuge.pools() -} catch (error) { - console.error(error) -} -``` - -```js -const subscription = centrifuge.pools().subscribe( - (pool) => console.log(pool), - (error) => console.error(error) -) -subscription.unsubscribe() -``` - -The returned results are either immutable values, or entities that can be further queried. - -### Transactions - -To perform transactions, you need to set a signer on the `centrifuge` instance. - -```js -centrifuge.setSigner(signer) -``` - -`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). - -With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. - -```js -const pool = await centrifuge.pool('1') -try { - const status = await pool.closeEpoch() - console.log(status) -} catch (error) { - console.error(error) -} -``` - -```js -const pool = await centrifuge.pool('1') -const subscription = pool.closeEpoch().subscribe( - (status) => console.log(pool), - (error) => console.error(error), - () => console.log('complete') -) -``` - -### Investments - -Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency - -Retrieve a vault by querying it from the pool: - -```js -const pool = await centrifuge.pool('1') -const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address -``` - -Query the state of an investment on the vault for an investor: - -```js -const investment = await vault.investment('0x123...') -// Will return an object containing: -// isAllowedToInvest - Whether an investor is allowed to invest in the tranche -// investmentCurrency - The ERC20 token that is used to invest in the vault -// investmentCurrencyBalance - The balance of the investor of the investment currency -// investmentCurrencyAllowance - The allowance of the vault -// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche -// shareBalance - The number of shares the investor has in the tranche -// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) -// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency -// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) -// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money -// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet -// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet -// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed -// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed -// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled -// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled -``` - -Invest in a vault: - -```js -const result = await vault.increaseInvestOrder(1000) -console.log(result.hash) -``` - -Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: - -```js -const result = await vault.claim() -``` - -### Reports - -Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. - -Available reports are: - -- `balanceSheet` -- `profitAndLoss` -- `cashflow` - -```ts -const pool = await centrifuge.pool('') -const balanceSheetReport = await pool.reports.balanceSheet() -``` - -#### Report Filtering - -Reports can be filtered using the `ReportFilter` type. - -```ts -type GroupBy = 'day' | 'month' | 'quarter' | 'year' - -const balanceSheetReport = await pool.reports.balanceSheet({ - from: '2024-01-01', - to: '2024-01-31', - groupBy: 'month', -}) -``` - -### Developer Docs - -#### Dev server - -```bash -yarn dev -``` - -#### Build - -```bash -yarn build -``` - -#### Test - -```bash -yarn test -yarn test:single -yarn test:simple:single ## without setup file, faster and without tenderly setup -``` - -#### PR Naming Convention - -PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. - -#### Semantic Versioning - -PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index c00ffe9..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,65 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [ReportFilter](#type-reportfilter) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index 4bd8f6c..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index bf2b0e0..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index b0183e0..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index d7f3361..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index e4b3af5..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index 67a6765..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index db585a9..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index 3c0e69f..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index dfdc10b..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index 72780f1..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index 520204c..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index 968168a..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index cda07b5..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index 89054cc..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index 40d3425..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index 94d521f..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 16ada07..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index 59dd528..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index 692fd02..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index 0af51a5..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index 4b084ec..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index 6a9e892..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index be9e3d7..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index f867b2f..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index eb4ef02..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 6871cbc..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index a6a5048..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index 357f054..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 567c669..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index 7949cea..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index 38e9234..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index 14d8f0b..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index 90fa469..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index 080299a..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index b5583d9..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index 5206bf7..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index abdb422..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index 4a398ef..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index 44ae6a0..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 32222fc..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index e06a512..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index 35f23fb..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index d2d132a..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index 95ee293..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index b61c487..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index 8664532..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md deleted file mode 100644 index c5758a3..0000000 --- a/docs/type-aliases/_ReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ReportFilter - -> **ReportFilter**: `object` - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L13) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index 8192424..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 70be558..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index c6c0e6b..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index a3e3c32..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/5924ed586d0e61ad527b0c53333be0f2d6e0ea5a/src/types/transaction.ts#L64) From da56da042f682c8e34ea6c7833ae54e012984fe0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 22:14:07 +0000 Subject: [PATCH 29/42] [ci:bot] Update docs --- docs/_README.md | 192 +++++++++ docs/_globals.md | 65 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_ReportFilter.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 53 files changed, 3614 insertions(+) create mode 100644 docs/_README.md create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_ReportFilter.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_README.md b/docs/_README.md new file mode 100644 index 0000000..c8677a5 --- /dev/null +++ b/docs/_README.md @@ -0,0 +1,192 @@ + +## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) + +The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. + +### Installation + +Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. + +```bash +npm install --save @centrifuge/sdk viem +## or +yarn install @centrifuge/sdk viem +``` + +### Init and config + +Create an instance and pass optional configuration + +```js +import Centrifuge from '@centrifuge/sdk' + +const centrifuge = new Centrifuge() +``` + +The following config options can be passed on initialization of the SDK: + +- `environment: 'mainnet' | 'demo' | 'dev'` + - Optional + - Default value: `mainnet` +- `rpcUrls: Record` + - Optional + - A object mapping chain ids to RPC URLs + +### Queries + +Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. + +```js +try { + const pool = await centrifuge.pools() +} catch (error) { + console.error(error) +} +``` + +```js +const subscription = centrifuge.pools().subscribe( + (pool) => console.log(pool), + (error) => console.error(error) +) +subscription.unsubscribe() +``` + +The returned results are either immutable values, or entities that can be further queried. + +### Transactions + +To perform transactions, you need to set a signer on the `centrifuge` instance. + +```js +centrifuge.setSigner(signer) +``` + +`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). + +With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. + +```js +const pool = await centrifuge.pool('1') +try { + const status = await pool.closeEpoch() + console.log(status) +} catch (error) { + console.error(error) +} +``` + +```js +const pool = await centrifuge.pool('1') +const subscription = pool.closeEpoch().subscribe( + (status) => console.log(pool), + (error) => console.error(error), + () => console.log('complete') +) +``` + +### Investments + +Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency + +Retrieve a vault by querying it from the pool: + +```js +const pool = await centrifuge.pool('1') +const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address +``` + +Query the state of an investment on the vault for an investor: + +```js +const investment = await vault.investment('0x123...') +// Will return an object containing: +// isAllowedToInvest - Whether an investor is allowed to invest in the tranche +// investmentCurrency - The ERC20 token that is used to invest in the vault +// investmentCurrencyBalance - The balance of the investor of the investment currency +// investmentCurrencyAllowance - The allowance of the vault +// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche +// shareBalance - The number of shares the investor has in the tranche +// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) +// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency +// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) +// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money +// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet +// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet +// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed +// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed +// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled +// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled +``` + +Invest in a vault: + +```js +const result = await vault.increaseInvestOrder(1000) +console.log(result.hash) +``` + +Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: + +```js +const result = await vault.claim() +``` + +### Reports + +Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. + +Available reports are: + +- `balanceSheet` +- `profitAndLoss` +- `cashflow` + +```ts +const pool = await centrifuge.pool('') +const balanceSheetReport = await pool.reports.balanceSheet() +``` + +#### Report Filtering + +Reports can be filtered using the `ReportFilter` type. + +```ts +type GroupBy = 'day' | 'month' | 'quarter' | 'year' + +const balanceSheetReport = await pool.reports.balanceSheet({ + from: '2024-01-01', + to: '2024-01-31', + groupBy: 'month', +}) +``` + +### Developer Docs + +#### Dev server + +```bash +yarn dev +``` + +#### Build + +```bash +yarn build +``` + +#### Test + +```bash +yarn test +yarn test:single +yarn test:simple:single ## without setup file, faster and without tenderly setup +``` + +#### PR Naming Convention + +PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +#### Semantic Versioning + +PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..c00ffe9 --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,65 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [ReportFilter](#type-reportfilter) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..610fedf --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..5692e1e --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..f6d83a7 --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..b88cde3 --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..a82ea2f --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..dbda8d5 --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..8c4b34c --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..47b376d --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..2613067 --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..a8a0286 --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..8ad1f5a --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..c42835a --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..0ab6591 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..8acea7c --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..5f43dd4 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..30613b2 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..5c10102 --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..0266612 --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..2472372 --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..a1502c0 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..bd47bee --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..dad313b --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..5daf10e --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..aaae899 --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..f41bfc0 --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..6402f72 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..f9631da --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..92e84a0 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..2e05e6e --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..1b35832 --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..0380a93 --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..1d586dd --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..f975d54 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..5baa1c5 --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..d28a515 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..c3b77e9 --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..a4fabb4 --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..8fc1bea --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..8eabd41 --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..2090f50 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..e42818b --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..486b38a --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..92519aa --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..a557050 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..8cf19ea --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..b8a7f65 --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md new file mode 100644 index 0000000..068247e --- /dev/null +++ b/docs/type-aliases/_ReportFilter.md @@ -0,0 +1,20 @@ + +## Type: ReportFilter + +> **ReportFilter**: `object` + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L13) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..0f77b81 --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..1a122ec --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..d83b525 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..06474bb --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L64) From f4a05552552306b18fda80681998b920366263a7 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 17:45:03 -0500 Subject: [PATCH 30/42] Exclude readme in typedoc generation --- docs/_README.md | 192 --------- docs/_globals.md | 65 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_ReportFilter.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - package.json | 2 +- typedoc-plugin.mjs | 18 +- typedoc.json | 19 +- 56 files changed, 31 insertions(+), 3622 deletions(-) delete mode 100644 docs/_README.md delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_ReportFilter.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_README.md b/docs/_README.md deleted file mode 100644 index c8677a5..0000000 --- a/docs/_README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## Centrifuge SDK [![Codecov](https://codecov.io/gh/centrifuge/sdk/graph/badge.svg?token=Q2yU8QfefP)](https://codecov.io/gh/centrifuge/sdk) [![Build CI status](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml/badge.svg)](https://github.com/centrifuge/sdk/actions/workflows/build-test-report.yml) [![Latest Release](https://img.shields.io/github/v/release/centrifuge/sdk?sort=semver)](https://github.com/centrifuge/sdk/releases/latest) - -The Centrifuge SDK is a JavaScript client for interacting with the [Centrifuge](https://centrifuge.io) ecosystem. It provides a comprehensive, fully typed library to integrate investments and redemptions, generate financial reports, manage pools, and much more. - -### Installation - -Centrifuge SDK uses [Viem](https://viem.sh/) under the hood. It's necessary to install it alongside the SDK. - -```bash -npm install --save @centrifuge/sdk viem -## or -yarn install @centrifuge/sdk viem -``` - -### Init and config - -Create an instance and pass optional configuration - -```js -import Centrifuge from '@centrifuge/sdk' - -const centrifuge = new Centrifuge() -``` - -The following config options can be passed on initialization of the SDK: - -- `environment: 'mainnet' | 'demo' | 'dev'` - - Optional - - Default value: `mainnet` -- `rpcUrls: Record` - - Optional - - A object mapping chain ids to RPC URLs - -### Queries - -Queries return Promise-like [Observables](https://rxjs.dev/guide/observable). They can be either awaited to get a single value, or subscribed to to get fresh data whenever on-chain data changes. - -```js -try { - const pool = await centrifuge.pools() -} catch (error) { - console.error(error) -} -``` - -```js -const subscription = centrifuge.pools().subscribe( - (pool) => console.log(pool), - (error) => console.error(error) -) -subscription.unsubscribe() -``` - -The returned results are either immutable values, or entities that can be further queried. - -### Transactions - -To perform transactions, you need to set a signer on the `centrifuge` instance. - -```js -centrifuge.setSigner(signer) -``` - -`signer` can be a [EIP1193](https://eips.ethereum.org/EIPS/eip-1193)-compatible provider or a Viem [LocalAccount](https://viem.sh/docs/accounts/local). - -With this you can call transaction methods. Similar to queries they can be awaited to get their final result, or subscribed to get get status updates. - -```js -const pool = await centrifuge.pool('1') -try { - const status = await pool.closeEpoch() - console.log(status) -} catch (error) { - console.error(error) -} -``` - -```js -const pool = await centrifuge.pool('1') -const subscription = pool.closeEpoch().subscribe( - (status) => console.log(pool), - (error) => console.error(error), - () => console.log('complete') -) -``` - -### Investments - -Investments for a pool are done via [ERC-7540 Tokenized Vaults](https://eips.ethereum.org/EIPS/eip-7540). Vaults can be deployed for a tranche on any supported network, for any supported currency - -Retrieve a vault by querying it from the pool: - -```js -const pool = await centrifuge.pool('1') -const vault = await pool.vault(1, '0xabc...', '0xdef...') // Chain ID, tranche ID, investment currency address -``` - -Query the state of an investment on the vault for an investor: - -```js -const investment = await vault.investment('0x123...') -// Will return an object containing: -// isAllowedToInvest - Whether an investor is allowed to invest in the tranche -// investmentCurrency - The ERC20 token that is used to invest in the vault -// investmentCurrencyBalance - The balance of the investor of the investment currency -// investmentCurrencyAllowance - The allowance of the vault -// shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche -// shareBalance - The number of shares the investor has in the tranche -// claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not) -// claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency -// claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not) -// claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money -// pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet -// pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet -// claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed -// claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed -// hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled -// hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled -``` - -Invest in a vault: - -```js -const result = await vault.increaseInvestOrder(1000) -console.log(result.hash) -``` - -Once an order has been processed, `claimableInvestShares` will positive and shares can be claimed with: - -```js -const result = await vault.claim() -``` - -### Reports - -Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials. - -Available reports are: - -- `balanceSheet` -- `profitAndLoss` -- `cashflow` - -```ts -const pool = await centrifuge.pool('') -const balanceSheetReport = await pool.reports.balanceSheet() -``` - -#### Report Filtering - -Reports can be filtered using the `ReportFilter` type. - -```ts -type GroupBy = 'day' | 'month' | 'quarter' | 'year' - -const balanceSheetReport = await pool.reports.balanceSheet({ - from: '2024-01-01', - to: '2024-01-31', - groupBy: 'month', -}) -``` - -### Developer Docs - -#### Dev server - -```bash -yarn dev -``` - -#### Build - -```bash -yarn build -``` - -#### Test - -```bash -yarn test -yarn test:single -yarn test:simple:single ## without setup file, faster and without tenderly setup -``` - -#### PR Naming Convention - -PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. - -#### Semantic Versioning - -PRs should be marked with the appropriate type: `major`, `minor`, `patch`, `no-release`. diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index c00ffe9..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,65 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [ReportFilter](#type-reportfilter) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index 610fedf..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index 5692e1e..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index f6d83a7..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index b88cde3..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index a82ea2f..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index dbda8d5..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index 8c4b34c..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index 47b376d..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index 2613067..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index a8a0286..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index 8ad1f5a..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index c42835a..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index 0ab6591..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index 8acea7c..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index 5f43dd4..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index 30613b2..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 5c10102..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index 0266612..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index 2472372..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index a1502c0..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index bd47bee..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index dad313b..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index 5daf10e..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index aaae899..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index f41bfc0..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 6402f72..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index f9631da..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index 92e84a0..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 2e05e6e..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index 1b35832..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index 0380a93..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index 1d586dd..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index f975d54..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index 5baa1c5..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index d28a515..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index c3b77e9..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index a4fabb4..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index 8fc1bea..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index 8eabd41..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 2090f50..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index e42818b..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index 486b38a..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index 92519aa..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index a557050..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index 8cf19ea..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index b8a7f65..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md deleted file mode 100644 index 068247e..0000000 --- a/docs/type-aliases/_ReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ReportFilter - -> **ReportFilter**: `object` - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L13) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index 0f77b81..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 1a122ec..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index d83b525..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index 06474bb..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/212732e73f25bd4510d6678f3b949dc7a9984e80/src/types/transaction.ts#L64) diff --git a/package.json b/package.json index aa04cef..c48f373 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "test:single": "mocha --loader=ts-node/esm --require $(pwd)/src/tests/setup.ts --exit --timeout 60000", "test:ci": "yarn test --reporter mocha-multi-reporters --reporter-options configFile=mocha-reporter-config.json", "test:coverage": "c8 yarn test:ci", - "gen:docs": "typedoc --out docs --skipErrorChecking --excludeExternals src/index.ts" + "gen:docs": "typedoc" }, "dependencies": { "decimal.js-light": "^2.5.1", diff --git a/typedoc-plugin.mjs b/typedoc-plugin.mjs index fdd0abc..5466db5 100644 --- a/typedoc-plugin.mjs +++ b/typedoc-plugin.mjs @@ -1,6 +1,8 @@ // @ts-check import url from 'node:url' import { MarkdownPageEvent } from 'typedoc-plugin-markdown' +import fs from 'node:fs/promises' +import path from 'node:path' /** * @param {import('typedoc-plugin-markdown').MarkdownApplication} app @@ -8,19 +10,25 @@ import { MarkdownPageEvent } from 'typedoc-plugin-markdown' export function load(app) { app.renderer.on(MarkdownPageEvent.END, (page) => { page.contents = page.contents - // Remove the noise before the first heading ?.replace(/(^.*?)(?=\n?#\s)/s, '') - // Remove generic type parameters from headings .replace(/^(# .*)(\\<.*?>)/m, (_, heading) => heading.replace(/\\<.*?>/, '').trim()) .replace('# Type Alias', '# Type') - // Increase the heading levels by one .replaceAll('# ', '## ') page.filename = page.filename?.replace(/\/([^\/]+)$/, '/_$1') page.contents = rewriteMarkdownLinks(page.contents ?? '', page.url) }) + app.renderer.postRenderAsyncJobs.push(async (renderer) => { - // Log the paths in a way that can be easily used with Slate - console.log(renderer.urls?.map((u) => u.url.replace(/\.md$/, '')).join('\n')) + console.log(renderer.urls?.map((u) => u.url).join('\n')) + + try { + // Delete the README.md + await fs.unlink(path.join(process.cwd(), 'docs', '_README.md')) + } catch (error) { + if (error.code !== 'ENOENT') { + console.error('Error deleting README.md:', error) + } + } }) } diff --git a/typedoc.json b/typedoc.json index ecb978b..44d4e31 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,3 +1,18 @@ { - "plugin": ["typedoc-plugin-markdown", "./typedoc-plugin.mjs"] -} + "plugin": [ + "typedoc-plugin-markdown", + "./typedoc-plugin.mjs" + ], + "exclude": [ + "**/README.md", + "**/node_modules/**", + "**/*.test.ts" + ], + "entryPoints": [ + "src/index.ts" + ], + "entryPointStrategy": "expand", + "skipErrorChecking": true, + "excludeExternals": true, + "out": "docs" +} \ No newline at end of file From 7cb1f39eb87d3c0ee1456e7c0477915f2c7a62bb Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 22:45:32 +0000 Subject: [PATCH 31/42] [ci:bot] Update docs --- docs/_globals.md | 65 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_ReportFilter.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 52 files changed, 3422 insertions(+) create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_ReportFilter.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..c00ffe9 --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,65 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [ReportFilter](#type-reportfilter) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..5efa863 --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..21aa38e --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..bec8056 --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..352e44d --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..d869b91 --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..18abff2 --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..9557c7c --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..22dd296 --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..8bf8706 --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..0ea6a4d --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..9c4e488 --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..351f156 --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..3cfad3e --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..3200c42 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..5999f4c --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..a7cc622 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..0fffe74 --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..28b42b2 --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..8e80d66 --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..9ffd1db --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..00d77ef --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..9549705 --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..6946676 --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..de64561 --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..45d14cf --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..5208a6b --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..bdb497b --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..130a972 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..8439e04 --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..b2aad6b --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..52054f9 --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..4115a98 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..71eb13c --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..eb05a2c --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..a44e4d4 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..f93058c --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..652bc2b --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..26d103d --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..1bac58e --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..dc18563 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..b315468 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..3e77075 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..b663e49 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..749511e --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..21d5ad9 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..3e236d6 --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md new file mode 100644 index 0000000..ac3e9d0 --- /dev/null +++ b/docs/type-aliases/_ReportFilter.md @@ -0,0 +1,20 @@ + +## Type: ReportFilter + +> **ReportFilter**: `object` + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L13) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..9735fcf --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..78f7da8 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..e4f9bb0 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..9b028ad --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L64) From 862f7f1e7a8d6021f967d75a29f9dd861d4ba104 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 17:49:20 -0500 Subject: [PATCH 32/42] Exclude _globals.md --- docs/_globals.md | 65 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_ReportFilter.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - typedoc-plugin.mjs | 2 + 53 files changed, 2 insertions(+), 3422 deletions(-) delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_ReportFilter.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index c00ffe9..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,65 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [ReportFilter](#type-reportfilter) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index 5efa863..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index 21aa38e..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index bec8056..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index 352e44d..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index d869b91..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index 18abff2..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index 9557c7c..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index 22dd296..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index 8bf8706..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index 0ea6a4d..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index 9c4e488..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index 351f156..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index 3cfad3e..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index 3200c42..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index 5999f4c..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index a7cc622..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 0fffe74..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index 28b42b2..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index 8e80d66..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index 9ffd1db..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index 00d77ef..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index 9549705..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index 6946676..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index de64561..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index 45d14cf..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 5208a6b..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index bdb497b..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index 130a972..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 8439e04..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index b2aad6b..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index 52054f9..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index 4115a98..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index 71eb13c..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index eb05a2c..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index a44e4d4..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index f93058c..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index 652bc2b..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index 26d103d..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index 1bac58e..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index dc18563..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index b315468..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index 3e77075..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index b663e49..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index 749511e..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index 21d5ad9..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index 3e236d6..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md deleted file mode 100644 index ac3e9d0..0000000 --- a/docs/type-aliases/_ReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ReportFilter - -> **ReportFilter**: `object` - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L13) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index 9735fcf..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 78f7da8..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index e4f9bb0..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index 9b028ad..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/f4a05552552306b18fda80681998b920366263a7/src/types/transaction.ts#L64) diff --git a/typedoc-plugin.mjs b/typedoc-plugin.mjs index 5466db5..e0f21c5 100644 --- a/typedoc-plugin.mjs +++ b/typedoc-plugin.mjs @@ -24,6 +24,8 @@ export function load(app) { try { // Delete the README.md await fs.unlink(path.join(process.cwd(), 'docs', '_README.md')) + // Delete _global.md + await fs.unlink(path.join(process.cwd(), 'docs', '_global.md')) } catch (error) { if (error.code !== 'ENOENT') { console.error('Error deleting README.md:', error) From 95301cda2d779dbee03cd12cabe2dff9ae13fa91 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 22:49:52 +0000 Subject: [PATCH 33/42] [ci:bot] Update docs --- docs/_globals.md | 65 +++ docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_ReportFilter.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 52 files changed, 3422 insertions(+) create mode 100644 docs/_globals.md create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_ReportFilter.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_globals.md b/docs/_globals.md new file mode 100644 index 0000000..c00ffe9 --- /dev/null +++ b/docs/_globals.md @@ -0,0 +1,65 @@ + +## @centrifuge/sdk + +### References + +#### default + +Renames and re-exports [Centrifuge](#class-centrifuge) + +### Classes + +- [Centrifuge](#class-centrifuge) +- [Currency](#class-currency) +- [~~Perquintill~~](#class-perquintill) +- [Pool](#class-pool) +- [PoolNetwork](#class-poolnetwork) +- [Price](#class-price) +- [~~Rate~~](#class-rate) +- [Reports](#class-reports) +- [Vault](#class-vault) + +### Typees + +- [AssetListReport](#type-assetlistreport) +- [AssetListReportBase](#type-assetlistreportbase) +- [AssetListReportFilter](#type-assetlistreportfilter) +- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) +- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) +- [AssetTransactionReport](#type-assettransactionreport) +- [AssetTransactionReportFilter](#type-assettransactionreportfilter) +- [BalanceSheetReport](#type-balancesheetreport) +- [CashflowReport](#type-cashflowreport) +- [CashflowReportBase](#type-cashflowreportbase) +- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) +- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) +- [Client](#type-client) +- [Config](#type-config) +- [CurrencyMetadata](#type-currencymetadata) +- [EIP1193ProviderLike](#type-eip1193providerlike) +- [FeeTransactionReport](#type-feetransactionreport) +- [FeeTransactionReportFilter](#type-feetransactionreportfilter) +- [GroupBy](#type-groupby) +- [HexString](#type-hexstring) +- [InvestorListReport](#type-investorlistreport) +- [InvestorListReportFilter](#type-investorlistreportfilter) +- [InvestorTransactionsReport](#type-investortransactionsreport) +- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) +- [OperationConfirmedStatus](#type-operationconfirmedstatus) +- [OperationPendingStatus](#type-operationpendingstatus) +- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) +- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) +- [OperationSigningStatus](#type-operationsigningstatus) +- [OperationStatus](#type-operationstatus) +- [OperationStatusType](#type-operationstatustype) +- [OperationSwitchChainStatus](#type-operationswitchchainstatus) +- [ProfitAndLossReport](#type-profitandlossreport) +- [ProfitAndLossReportBase](#type-profitandlossreportbase) +- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) +- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) +- [Query](#type-query) +- [ReportFilter](#type-reportfilter) +- [Signer](#type-signer) +- [TokenPriceReport](#type-tokenpricereport) +- [TokenPriceReportFilter](#type-tokenpricereportfilter) +- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..6d6716e --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..1689f2b --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..f8b81c2 --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..5444931 --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..51a90c7 --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..1461bfc --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..3fb3d53 --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..63fe914 --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..97918f2 --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..8eba66f --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..3bc86b4 --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..44c54bb --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..9c9d8be --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..1454b54 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..f28186a --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..7aa2d9b --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..07d497f --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..a9caa8f --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..48d25b2 --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..ebe6a56 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..a21df69 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..b47b14a --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..8e7850b --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..17cc667 --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..3fedca2 --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..fd271cc --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..72f2adb --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..2e8f818 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..9452366 --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..ec61395 --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..0168593 --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..3aa73d2 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..9b59de4 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..5574ef0 --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..d78929b --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..416b8cf --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..555f34b --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..3a2bbf1 --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..b6c5161 --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..9d32b74 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..ac06cb1 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..899823d --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..ac3457c --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..5c4bf77 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..4116aeb --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..0a50d76 --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md new file mode 100644 index 0000000..26976ae --- /dev/null +++ b/docs/type-aliases/_ReportFilter.md @@ -0,0 +1,20 @@ + +## Type: ReportFilter + +> **ReportFilter**: `object` + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L13) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..6df9bac --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..a79d5a3 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..6146f85 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..3fce90d --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L64) From ae12cdce6833f297c221dbc7667d8a8a900a03f0 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 17:52:04 -0500 Subject: [PATCH 34/42] Fix typo --- docs/_globals.md | 65 --- docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_ReportFilter.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - typedoc-plugin.mjs | 2 +- 53 files changed, 1 insertion(+), 3423 deletions(-) delete mode 100644 docs/_globals.md delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_ReportFilter.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/_globals.md b/docs/_globals.md deleted file mode 100644 index c00ffe9..0000000 --- a/docs/_globals.md +++ /dev/null @@ -1,65 +0,0 @@ - -## @centrifuge/sdk - -### References - -#### default - -Renames and re-exports [Centrifuge](#class-centrifuge) - -### Classes - -- [Centrifuge](#class-centrifuge) -- [Currency](#class-currency) -- [~~Perquintill~~](#class-perquintill) -- [Pool](#class-pool) -- [PoolNetwork](#class-poolnetwork) -- [Price](#class-price) -- [~~Rate~~](#class-rate) -- [Reports](#class-reports) -- [Vault](#class-vault) - -### Typees - -- [AssetListReport](#type-assetlistreport) -- [AssetListReportBase](#type-assetlistreportbase) -- [AssetListReportFilter](#type-assetlistreportfilter) -- [AssetListReportPrivateCredit](#type-assetlistreportprivatecredit) -- [AssetListReportPublicCredit](#type-assetlistreportpubliccredit) -- [AssetTransactionReport](#type-assettransactionreport) -- [AssetTransactionReportFilter](#type-assettransactionreportfilter) -- [BalanceSheetReport](#type-balancesheetreport) -- [CashflowReport](#type-cashflowreport) -- [CashflowReportBase](#type-cashflowreportbase) -- [CashflowReportPrivateCredit](#type-cashflowreportprivatecredit) -- [CashflowReportPublicCredit](#type-cashflowreportpubliccredit) -- [Client](#type-client) -- [Config](#type-config) -- [CurrencyMetadata](#type-currencymetadata) -- [EIP1193ProviderLike](#type-eip1193providerlike) -- [FeeTransactionReport](#type-feetransactionreport) -- [FeeTransactionReportFilter](#type-feetransactionreportfilter) -- [GroupBy](#type-groupby) -- [HexString](#type-hexstring) -- [InvestorListReport](#type-investorlistreport) -- [InvestorListReportFilter](#type-investorlistreportfilter) -- [InvestorTransactionsReport](#type-investortransactionsreport) -- [InvestorTransactionsReportFilter](#type-investortransactionsreportfilter) -- [OperationConfirmedStatus](#type-operationconfirmedstatus) -- [OperationPendingStatus](#type-operationpendingstatus) -- [OperationSignedMessageStatus](#type-operationsignedmessagestatus) -- [OperationSigningMessageStatus](#type-operationsigningmessagestatus) -- [OperationSigningStatus](#type-operationsigningstatus) -- [OperationStatus](#type-operationstatus) -- [OperationStatusType](#type-operationstatustype) -- [OperationSwitchChainStatus](#type-operationswitchchainstatus) -- [ProfitAndLossReport](#type-profitandlossreport) -- [ProfitAndLossReportBase](#type-profitandlossreportbase) -- [ProfitAndLossReportPrivateCredit](#type-profitandlossreportprivatecredit) -- [ProfitAndLossReportPublicCredit](#type-profitandlossreportpubliccredit) -- [Query](#type-query) -- [ReportFilter](#type-reportfilter) -- [Signer](#type-signer) -- [TokenPriceReport](#type-tokenpricereport) -- [TokenPriceReportFilter](#type-tokenpricereportfilter) -- [Transaction](#type-transaction) diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index 6d6716e..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index 1689f2b..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index f8b81c2..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index 5444931..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index 51a90c7..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index 1461bfc..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index 3fb3d53..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index 63fe914..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index 97918f2..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index 8eba66f..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index 3bc86b4..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index 44c54bb..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index 9c9d8be..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index 1454b54..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index f28186a..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index 7aa2d9b..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 07d497f..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index a9caa8f..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index 48d25b2..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index ebe6a56..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index a21df69..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index b47b14a..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index 8e7850b..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index 17cc667..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index 3fedca2..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index fd271cc..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index 72f2adb..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index 2e8f818..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 9452366..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index ec61395..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index 0168593..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index 3aa73d2..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index 9b59de4..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index 5574ef0..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index d78929b..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index 416b8cf..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index 555f34b..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index 3a2bbf1..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index b6c5161..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 9d32b74..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index ac06cb1..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index 899823d..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index ac3457c..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index 5c4bf77..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index 4116aeb..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index 0a50d76..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md deleted file mode 100644 index 26976ae..0000000 --- a/docs/type-aliases/_ReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ReportFilter - -> **ReportFilter**: `object` - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L13) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index 6df9bac..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index a79d5a3..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index 6146f85..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index 3fce90d..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/862f7f1e7a8d6021f967d75a29f9dd861d4ba104/src/types/transaction.ts#L64) diff --git a/typedoc-plugin.mjs b/typedoc-plugin.mjs index e0f21c5..53bf505 100644 --- a/typedoc-plugin.mjs +++ b/typedoc-plugin.mjs @@ -25,7 +25,7 @@ export function load(app) { // Delete the README.md await fs.unlink(path.join(process.cwd(), 'docs', '_README.md')) // Delete _global.md - await fs.unlink(path.join(process.cwd(), 'docs', '_global.md')) + await fs.unlink(path.join(process.cwd(), 'docs', '_globals.md')) } catch (error) { if (error.code !== 'ENOENT') { console.error('Error deleting README.md:', error) From 34d731a735be3956f57698965c9b7ae87dc12f95 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 Jan 2025 22:52:31 +0000 Subject: [PATCH 35/42] [ci:bot] Update docs --- docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_ReportFilter.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 51 files changed, 3357 insertions(+) create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_ReportFilter.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..26042c3 --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..89b3a51 --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..1c60adc --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..19291a9 --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..6df372a --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..8c88ede --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..6c82726 --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..08ed00e --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..ff424f6 --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..b871b07 --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..f75cdab --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..5a00904 --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..b0c1db6 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..cca36b5 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..731b6f6 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..67a1e78 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..bf572a2 --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..3c41797 --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..c4d765f --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..df3acdc --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..abde451 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..3db32c5 --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..a0ff42b --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..9d27835 --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..27d61da --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..011a7f7 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..56d88eb --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..40ae0f2 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..38af280 --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..06f4deb --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..5c7b77e --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..3e7a5de --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..34514d5 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..c1f878e --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..d69e2f1 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..ea0db20 --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..f8f0a8e --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..b02daf4 --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..406d9a9 --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..2ce3f46 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..00081b6 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..90aa52f --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..ae1ceb0 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..dd5f8b2 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..b49fa25 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..eb0f16a --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md new file mode 100644 index 0000000..7d85bd7 --- /dev/null +++ b/docs/type-aliases/_ReportFilter.md @@ -0,0 +1,20 @@ + +## Type: ReportFilter + +> **ReportFilter**: `object` + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L13) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..2401c38 --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..4567612 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..45f0523 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..5e4610d --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L64) From 79d45697f9b6106b3d1d9dcce5a23a782e3f3366 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 14 Jan 2025 17:58:43 -0500 Subject: [PATCH 36/42] Add note in readme and switch trigger branch to main --- .github/workflows/update-docs.yml | 2 +- README.md | 4 + docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_ReportFilter.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - 53 files changed, 5 insertions(+), 3358 deletions(-) delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_ReportFilter.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 3de6a8f..0878a62 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -5,7 +5,7 @@ name: Update Docs on: push: branches: - - generate-docs + - main jobs: update-docs: diff --git a/README.md b/README.md index 906b148..9631396 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,10 @@ yarn test:single yarn test:simple:single # without setup file, faster and without tenderly setup ``` +## User Docs + +User docs are written and maintained in the [sdk-docs](https://github.com/centrifuge/sdk-docs) repository. On push to the `main` branch, a GitHub Action will run and update the docs with the auto-generated docs from this repository using ([typedoc](https://typedoc.org/)). + ### PR Naming Convention PR naming should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index 26042c3..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index 89b3a51..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index 1c60adc..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index 19291a9..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index 6df372a..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index 8c88ede..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index 6c82726..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index 08ed00e..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index ff424f6..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index b871b07..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index f75cdab..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index 5a00904..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index b0c1db6..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index cca36b5..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index 731b6f6..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index 67a1e78..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index bf572a2..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index 3c41797..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index c4d765f..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index df3acdc..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index abde451..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index 3db32c5..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index a0ff42b..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index 9d27835..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index 27d61da..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 011a7f7..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index 56d88eb..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index 40ae0f2..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 38af280..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index 06f4deb..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index 5c7b77e..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index 3e7a5de..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index 34514d5..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index c1f878e..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index d69e2f1..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index ea0db20..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index f8f0a8e..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index b02daf4..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index 406d9a9..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index 2ce3f46..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index 00081b6..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index 90aa52f..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index ae1ceb0..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index dd5f8b2..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index b49fa25..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index eb0f16a..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md deleted file mode 100644 index 7d85bd7..0000000 --- a/docs/type-aliases/_ReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ReportFilter - -> **ReportFilter**: `object` - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L13) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index 2401c38..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 4567612..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index 45f0523..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index 5e4610d..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/ae12cdce6833f297c221dbc7667d8a8a900a03f0/src/types/transaction.ts#L64) From 63f931bc5a4ec5e31893622a6cf1173eefd8b258 Mon Sep 17 00:00:00 2001 From: sophian Date: Wed, 15 Jan 2025 16:26:05 -0500 Subject: [PATCH 37/42] Exclude docs from test coverage --- .c8rc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.c8rc.json b/.c8rc.json index e8d5d09..6c9f553 100644 --- a/.c8rc.json +++ b/.c8rc.json @@ -1,8 +1,8 @@ { "all": true, "include": ["src/**/*.ts"], - "exclude": ["src/**/*.d.ts", "src/**/*.test.ts", "src/types/*.ts", "src/tests/**/*.ts"], + "exclude": ["src/**/*.d.ts", "src/**/*.test.ts", "src/types/*.ts", "src/tests/**/*.ts", "docs/**/*.md"], "reporter": ["text", "lcov"], "extension": [".ts"], "report-dir": "./coverage" -} \ No newline at end of file +} From 25fd69294d403960b5da86230defa2f6a344ea1e Mon Sep 17 00:00:00 2001 From: sophian Date: Wed, 15 Jan 2025 16:26:39 -0500 Subject: [PATCH 38/42] Improve script to handle updating index.html.md and deleting old files --- .github/ci-scripts/update-sdk-docs.cjs | 200 +++++++++++++++++-------- 1 file changed, 138 insertions(+), 62 deletions(-) diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index 7d52e03..74a675b 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -1,102 +1,178 @@ const fs = require('fs/promises') const path = require('path') const simpleGit = require('simple-git') +const { execSync } = require('child_process') + +/** + * Recursively gets all files from a directory + */ +async function getFilesRecursively(dir) { + const items = await fs.readdir(dir, { withFileTypes: true }) + const files = await Promise.all( + items.map(async (item) => { + const filePath = path.join(dir, item.name) + return item.isDirectory() ? getFilesRecursively(filePath) : filePath + }) + ) + return files.flat() +} + +/** + * Cleans generated documentation folders: classes and type-aliases + */ +async function cleanGeneratedDocs(targetDir) { + const foldersToClean = ['classes', 'type-aliases'] + for (const folder of foldersToClean) { + const folderPath = path.join(targetDir, folder) + try { + await fs.rm(folderPath, { recursive: true, force: true }) + console.log(`✨ Cleared existing ${folder} folder`) + } catch (error) { + if (error.code !== 'ENOENT') { + console.error(`❌ Error clearing ${folder} folder:`, error) + } + } + } +} +/** + * Copies documentation files while maintaining structure + */ async function copyDocs(sourceDir, targetDir) { try { - // Create the target directory if it doesn't exist await fs.mkdir(targetDir, { recursive: true }) + await cleanGeneratedDocs(targetDir) - // Get all files from docs directory recursively - const getFiles = async (dir) => { - const items = await fs.readdir(dir, { withFileTypes: true }) - const files = await Promise.all( - items.map(async (item) => { - const filePath = path.join(dir, item.name) - return item.isDirectory() ? getFiles(filePath) : filePath - }) - ) - return files.flat() - } - - const docFiles = await getFiles(sourceDir) - - // Copy each file to the target directory, maintaining directory structure + const docFiles = await getFilesRecursively(sourceDir) for (const file of docFiles) { const relativePath = path.relative(sourceDir, file) - - // Skip README.md - if (path.basename(file) === 'README.md') { - console.log('Skipping README.md') - continue - } + if (path.basename(file) === 'README.md') continue const targetPath = path.join(targetDir, relativePath) - - // Create the nested directory structure if it doesn't exist await fs.mkdir(path.dirname(targetPath), { recursive: true }) - - // Copy the file, overwriting if it exists await fs.copyFile(file, targetPath) - console.log(`Copied: ${relativePath}`) + console.log(`📄 Copied: ${relativePath}`) } } catch (error) { - console.error('Error copying docs:', error) + console.error('❌ Error copying docs:', error) + throw error + } +} + +/** + * Processes and updates the index.html.md file + */ +async function updateIndexHtmlMd(docsDir, indexHtmlMdPath) { + try { + const content = await fs.readFile(indexHtmlMdPath, 'utf8') + const docFiles = await getFilesRecursively(docsDir) + + // Transform and validate files + const actualFiles = new Set( + docFiles.map((file) => path.relative(docsDir, file).replace(/\/_/g, '/').replace(/^_/, '').replace(/\.md$/, '')) + ) + + // Extract existing includes + const existingIncludesMatch = content.match(/^includes:\n((?: - .*\n)*)/m) + const existingIncludes = existingIncludesMatch + ? existingIncludesMatch[1] + .split('\n') + .map((line) => line.replace(' - ', '')) + .filter(Boolean) + : [] + + // Process new includes + const newIncludes = docFiles + .filter((file) => file.endsWith('.md')) + .filter((file) => !file.includes('README.md')) + .map((file) => { + const relativePath = path.relative(docsDir, file) + return relativePath.replace(/\/_/g, '/').replace(/^_/, '').replace(/\.md$/, '') + }) + + // Combine and validate includes + const allIncludes = [ + ...existingIncludes.filter((inc) => !inc.startsWith('classes/') && !inc.startsWith('type-aliases/')), + ...newIncludes, + ] + .filter((value, index, self) => self.indexOf(value) === index) + .filter((include) => { + if (include.startsWith('classes/') || include.startsWith('type-aliases/')) { + const exists = actualFiles.has(include) + if (!exists) console.log(`⚠️ Warning: File not found for include: ${include}`) + return exists + } + return true + }) + + // Update content + const [frontmatterStart, ...rest] = content.split(/^includes:/m) + const remainingContent = rest.join('includes:').split('---') + const postFrontmatter = remainingContent.slice(1).join('---') + + const updatedContent = `${frontmatterStart}includes: +${allIncludes.map((file) => ` - ${file}`).join('\n')} +search: true +---${postFrontmatter}` + + await fs.writeFile(indexHtmlMdPath, updatedContent) + + // Display results + console.log('\n📝 First 100 lines of updated file:') + console.log('----------------------------------------') + console.log(updatedContent.split('\n').slice(0, 100).join('\n')) + console.log('----------------------------------------') + console.log(`✅ Total includes: ${allIncludes.length}`) + } catch (error) { + console.error('❌ Error updating index.html.md:', error) throw error } } +/** + * Creates a PR in the sdk-docs repository + */ +async function createPullRequest(git, branchName) { + const prTitle = '[sdk:ci:bot] Update SDK Documentation' + const prBody = + '[sdk:ci:bot] Automated PR to update SDK documentation: [Actions](https://github.com/centrifuge/sdk/actions/workflows/update-docs.yml)' + + const prCommand = `gh pr create \ + --title "${prTitle}" \ + --body "${prBody}" \ + --base main \ + --head ${branchName} \ + --repo "centrifuge/sdk-docs"` + + execSync(prCommand, { + stdio: 'inherit', + env: { ...process.env, GH_TOKEN: process.env.PAT_TOKEN }, + }) +} + async function main() { try { const git = simpleGit() - // Clone the SDK docs repo const repoUrl = `https://${process.env.PAT_TOKEN}@github.com/centrifuge/sdk-docs.git` - await git.clone(repoUrl) + await git.clone(repoUrl) await git .cwd('./sdk-docs') .addConfig('user.name', 'github-actions[bot]') .addConfig('user.email', 'github-actions[bot]@users.noreply.github.com') - // Copy docs to the target location - await copyDocs( - './docs', // source directory - './sdk-docs/source/includes' // target directory - ) + await copyDocs('./docs', './sdk-docs/source/includes') + await updateIndexHtmlMd('./docs', './sdk-docs/source/index.html.md') - // Create and switch to a new branch (docs-update-YYYY-MM-DD-HH-mm-ss) const branchName = `docs-update-${new Date().toISOString().slice(0, 19).replace(/[:-]/g, '').replace(' ', '-')}` await git.checkoutLocalBranch(branchName) - - // Add and commit changes await git.add('.').commit('Update SDK documentation') - - // Push the new branch await git.push('origin', branchName) - // Create PR using GitHub CLI - const prTitle = '[sdk:ci:bot] Update SDK Documentation' - const prBody = - '[sdk:ci:bot] Automated PR to update SDK documentation: [Actions](https://github.com/centrifuge/sdk/actions/workflows/update-docs.yml)' - const prCommand = `gh pr create \ - --title "${prTitle}" \ - --body "${prBody}" \ - --base main \ - --head ${branchName} \ - --repo "centrifuge/sdk-docs"` - - const { execSync } = require('child_process') - execSync(prCommand, { - stdio: 'inherit', - env: { - ...process.env, - GH_TOKEN: process.env.PAT_TOKEN, - }, - }) - - console.log('Successfully created PR with documentation updates') + await createPullRequest(git, branchName) + console.log('✅ Successfully created PR with documentation updates') } catch (error) { - console.error('Failed to process docs:', error) + console.error('❌ Failed to process docs:', error) process.exit(1) } } From e8e313ed95c35b522a7e87515220a81ae2649430 Mon Sep 17 00:00:00 2001 From: sophian Date: Wed, 15 Jan 2025 16:29:04 -0500 Subject: [PATCH 39/42] Update target for testing --- .github/workflows/update-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 0878a62..3de6a8f 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -5,7 +5,7 @@ name: Update Docs on: push: branches: - - main + - generate-docs jobs: update-docs: From 45d9bb1ca564a833f275b7c8aed5e263eebfde37 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 15 Jan 2025 21:29:35 +0000 Subject: [PATCH 40/42] [ci:bot] Update docs --- docs/classes/_Centrifuge.md | 224 ++++++++++ docs/classes/_Currency.md | 370 +++++++++++++++++ docs/classes/_Perquintill.md | 322 +++++++++++++++ docs/classes/_Pool.md | 136 ++++++ docs/classes/_PoolNetwork.md | 202 +++++++++ docs/classes/_Price.md | 362 ++++++++++++++++ docs/classes/_Rate.md | 386 ++++++++++++++++++ docs/classes/_Reports.md | 178 ++++++++ docs/classes/_Vault.md | 227 ++++++++++ docs/type-aliases/_AssetListReport.md | 6 + docs/type-aliases/_AssetListReportBase.md | 24 ++ docs/type-aliases/_AssetListReportFilter.md | 20 + .../_AssetListReportPrivateCredit.md | 64 +++ .../_AssetListReportPublicCredit.md | 36 ++ docs/type-aliases/_AssetTransactionReport.md | 36 ++ .../_AssetTransactionReportFilter.md | 24 ++ docs/type-aliases/_BalanceSheetReport.md | 46 +++ docs/type-aliases/_CashflowReport.md | 6 + docs/type-aliases/_CashflowReportBase.md | 62 +++ .../_CashflowReportPrivateCredit.md | 16 + .../_CashflowReportPublicCredit.md | 20 + docs/type-aliases/_Client.md | 6 + docs/type-aliases/_Config.md | 24 ++ docs/type-aliases/_CurrencyMetadata.md | 32 ++ docs/type-aliases/_EIP1193ProviderLike.md | 20 + docs/type-aliases/_FeeTransactionReport.md | 24 ++ .../_FeeTransactionReportFilter.md | 20 + docs/type-aliases/_GroupBy.md | 6 + docs/type-aliases/_HexString.md | 6 + docs/type-aliases/_InvestorListReport.md | 40 ++ .../type-aliases/_InvestorListReportFilter.md | 28 ++ .../_InvestorTransactionsReport.md | 52 +++ .../_InvestorTransactionsReportFilter.md | 32 ++ .../type-aliases/_OperationConfirmedStatus.md | 24 ++ docs/type-aliases/_OperationPendingStatus.md | 20 + .../_OperationSignedMessageStatus.md | 20 + .../_OperationSigningMessageStatus.md | 16 + docs/type-aliases/_OperationSigningStatus.md | 16 + docs/type-aliases/_OperationStatus.md | 6 + docs/type-aliases/_OperationStatusType.md | 6 + .../_OperationSwitchChainStatus.md | 16 + docs/type-aliases/_ProfitAndLossReport.md | 6 + docs/type-aliases/_ProfitAndLossReportBase.md | 42 ++ .../_ProfitAndLossReportPrivateCredit.md | 20 + .../_ProfitAndLossReportPublicCredit.md | 16 + docs/type-aliases/_Query.md | 20 + docs/type-aliases/_ReportFilter.md | 20 + docs/type-aliases/_Signer.md | 6 + docs/type-aliases/_TokenPriceReport.md | 20 + docs/type-aliases/_TokenPriceReportFilter.md | 20 + docs/type-aliases/_Transaction.md | 6 + 51 files changed, 3357 insertions(+) create mode 100644 docs/classes/_Centrifuge.md create mode 100644 docs/classes/_Currency.md create mode 100644 docs/classes/_Perquintill.md create mode 100644 docs/classes/_Pool.md create mode 100644 docs/classes/_PoolNetwork.md create mode 100644 docs/classes/_Price.md create mode 100644 docs/classes/_Rate.md create mode 100644 docs/classes/_Reports.md create mode 100644 docs/classes/_Vault.md create mode 100644 docs/type-aliases/_AssetListReport.md create mode 100644 docs/type-aliases/_AssetListReportBase.md create mode 100644 docs/type-aliases/_AssetListReportFilter.md create mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md create mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md create mode 100644 docs/type-aliases/_AssetTransactionReport.md create mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md create mode 100644 docs/type-aliases/_BalanceSheetReport.md create mode 100644 docs/type-aliases/_CashflowReport.md create mode 100644 docs/type-aliases/_CashflowReportBase.md create mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md create mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md create mode 100644 docs/type-aliases/_Client.md create mode 100644 docs/type-aliases/_Config.md create mode 100644 docs/type-aliases/_CurrencyMetadata.md create mode 100644 docs/type-aliases/_EIP1193ProviderLike.md create mode 100644 docs/type-aliases/_FeeTransactionReport.md create mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md create mode 100644 docs/type-aliases/_GroupBy.md create mode 100644 docs/type-aliases/_HexString.md create mode 100644 docs/type-aliases/_InvestorListReport.md create mode 100644 docs/type-aliases/_InvestorListReportFilter.md create mode 100644 docs/type-aliases/_InvestorTransactionsReport.md create mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md create mode 100644 docs/type-aliases/_OperationConfirmedStatus.md create mode 100644 docs/type-aliases/_OperationPendingStatus.md create mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md create mode 100644 docs/type-aliases/_OperationSigningStatus.md create mode 100644 docs/type-aliases/_OperationStatus.md create mode 100644 docs/type-aliases/_OperationStatusType.md create mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md create mode 100644 docs/type-aliases/_ProfitAndLossReport.md create mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md create mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md create mode 100644 docs/type-aliases/_Query.md create mode 100644 docs/type-aliases/_ReportFilter.md create mode 100644 docs/type-aliases/_Signer.md create mode 100644 docs/type-aliases/_TokenPriceReport.md create mode 100644 docs/type-aliases/_TokenPriceReportFilter.md create mode 100644 docs/type-aliases/_Transaction.md diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md new file mode 100644 index 0000000..a399073 --- /dev/null +++ b/docs/classes/_Centrifuge.md @@ -0,0 +1,224 @@ + +## Class: Centrifuge + +Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L72) + +### Constructors + +#### new Centrifuge() + +> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) + +Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L97) + +##### Parameters + +###### config + +`Partial`\<[`Config`](#type-config)\> = `{}` + +##### Returns + +[`Centrifuge`](#class-centrifuge) + +### Accessors + +#### chains + +##### Get Signature + +> **get** **chains**(): `number`[] + +Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L74) + +###### Returns + +`DerivedConfig` + +*** + +#### signer + +##### Get Signature + +> **get** **signer**(): `null` \| [`Signer`](#type-signer) + +Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L93) + +###### Returns + +`null` \| [`Signer`](#type-signer) + +### Methods + +#### account() + +> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> + +Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L123) + +##### Parameters + +###### address + +`string` + +###### chainId? + +`number` + +##### Returns + +[`Query`](#type-query)\<`Account`\> + +*** + +#### balance() + +> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L168) + +Get the balance of an ERC20 token for a given owner. + +##### Parameters + +###### currency + +`string` + +The token address + +###### owner + +`string` + +The owner address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### currency() + +> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L132) + +Get the metadata for an ERC20 token + +##### Parameters + +###### address + +`string` + +The token address + +###### chainId? + +`number` + +The chain ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### getChainConfig() + +> **getChainConfig**(`chainId`?): `Chain` + +Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L85) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`Chain` + +*** + +#### getClient() + +> **getClient**(`chainId`?): `undefined` \| \{\} + +Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L79) + +##### Parameters + +###### chainId? + +`number` + +##### Returns + +`undefined` \| \{\} + +*** + +#### pool() + +> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> + +Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L119) + +##### Parameters + +###### id + +`string` | `number` + +###### metadataHash? + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Pool`](#class-pool)\> + +*** + +#### setSigner() + +> **setSigner**(`signer`): `void` + +Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L90) + +##### Parameters + +###### signer + +`null` | [`Signer`](#type-signer) + +##### Returns + +`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md new file mode 100644 index 0000000..e55d1f9 --- /dev/null +++ b/docs/classes/_Currency.md @@ -0,0 +1,370 @@ + +## Class: Currency + +Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L124) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Currency() + +> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Currency`](#class-currency) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ZERO + +> `static` **ZERO**: [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L129) + +### Methods + +#### add() + +> **add**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L131) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### div() + +> **div**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L143) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L139) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### sub() + +> **sub**(`value`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L135) + +##### Parameters + +###### value + +`bigint` | [`Currency`](#class-currency) + +##### Returns + +[`Currency`](#class-currency) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) + +Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L125) + +##### Parameters + +###### num + +`Numeric` + +###### decimals + +`number` + +##### Returns + +[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md new file mode 100644 index 0000000..429288f --- /dev/null +++ b/docs/classes/_Perquintill.md @@ -0,0 +1,322 @@ + +## Class: ~~Perquintill~~ + +Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L246) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Perquintill() + +> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L249) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L253) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) + +Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L257) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md new file mode 100644 index 0000000..fc188a4 --- /dev/null +++ b/docs/classes/_Pool.md @@ -0,0 +1,136 @@ + +## Class: Pool + +Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L13) + +### Accessors + +#### reports + +##### Get Signature + +> **get** **reports**(): [`Reports`](#class-reports) + +Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L18) + +###### Returns + +[`Reports`](#class-reports) + +### Methods + +#### activeNetworks() + +> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L79) + +Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### metadata() + +> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L22) + +##### Returns + +[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> + +*** + +#### network() + +> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L64) + +Get a specific network where a pool can potentially be deployed. + +##### Parameters + +###### chainId + +`number` + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> + +*** + +#### networks() + +> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L51) + +Get all networks where a pool can potentially be deployed. + +##### Returns + +[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> + +*** + +#### trancheIds() + +> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> + +Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L28) + +##### Returns + +[`Query`](#type-query)\<`string`[]\> + +*** + +#### vault() + +> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L100) + +##### Parameters + +###### chainId + +`number` + +###### trancheId + +`string` + +###### asset + +`string` + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md new file mode 100644 index 0000000..4c7275e --- /dev/null +++ b/docs/classes/_PoolNetwork.md @@ -0,0 +1,202 @@ + +## Class: PoolNetwork + +Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L16) + +Query and interact with a pool on a specific network. + +### Extends + +- `Entity` + +### Properties + +#### chainId + +> **chainId**: `number` + +Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L269) + +Get whether a pool is active and the tranche token can be deployed. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### deployTranche() + +> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L306) + +Deploy a tranche token for the pool. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### deployVault() + +> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) + +Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L330) + +Deploy a vault for a specific tranche x currency combination. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### currencyAddress + +`string` + +The investment currency address + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### isActive() + +> **isActive**(): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L232) + +Get whether the pool is active on this network. It's a prerequisite for deploying vaults, +and doesn't indicate whether any vaults have been deployed. + +##### Returns + +[`Query`](#type-query)\<`boolean`\> + +*** + +#### shareCurrency() + +> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L143) + +Get the details of the share token. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### vault() + +> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> + +Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L215) + +Get a specific Vault for a given tranche and investment currency. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +###### asset + +`string` + +The investment currency address + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)\> + +*** + +#### vaults() + +> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L154) + +Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. +Vaults are used to submit/claim investments and redemptions. + +##### Parameters + +###### trancheId + +`string` + +The tranche ID + +##### Returns + +[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> + +*** + +#### vaultsByTranche() + +> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L198) + +Get all Vaults for all tranches in the pool. + +##### Returns + +[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> + +An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md new file mode 100644 index 0000000..248f0a8 --- /dev/null +++ b/docs/classes/_Price.md @@ -0,0 +1,362 @@ + +## Class: Price + +Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L215) + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Price() + +> **new Price**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L218) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +##### Returns + +[`Price`](#class-price) + +##### Overrides + +`DecimalWrapper.constructor` + +### Properties + +#### decimals + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### value + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### decimals + +> `static` **decimals**: `number` = `18` + +Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L216) + +### Methods + +#### add() + +> **add**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L226) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### div() + +> **div**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L238) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### eq() + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### gt() + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### gte() + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### isZero() + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### lt() + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### lte() + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### mul() + +> **mul**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L234) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### sub() + +> **sub**(`value`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L230) + +##### Parameters + +###### value + +`bigint` | [`Price`](#class-price) + +##### Returns + +[`Price`](#class-price) + +*** + +#### toBigInt() + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### toDecimal() + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### toFloat() + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### toString() + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### fromFloat() + +> `static` **fromFloat**(`number`): [`Price`](#class-price) + +Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L222) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md new file mode 100644 index 0000000..0b6bbf4 --- /dev/null +++ b/docs/classes/_Rate.md @@ -0,0 +1,386 @@ + +## Class: ~~Rate~~ + +Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L177) + +### Deprecated + +### Extends + +- `DecimalWrapper` + +### Constructors + +#### new Rate() + +> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L29) + +##### Parameters + +###### value + +`bigint` | `Numeric` + +###### decimals + +`number` = `27` + +##### Returns + +[`Rate`](#class-rate) + +##### Inherited from + +`DecimalWrapper.constructor` + +### Properties + +#### ~~decimals~~ + +> `readonly` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L27) + +##### Inherited from + +`DecimalWrapper.decimals` + +*** + +#### ~~value~~ + +> `protected` **value**: `bigint` + +Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L3) + +##### Inherited from + +`DecimalWrapper.value` + +*** + +#### ~~decimals~~ + +> `static` **decimals**: `number` = `27` + +Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L115) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.eq` + +*** + +#### ~~gt()~~ + +> **gt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L105) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gt` + +*** + +#### ~~gte()~~ + +> **gte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L110) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.gte` + +*** + +#### ~~isZero()~~ + +> **isZero**(): `boolean` + +Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L119) + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.isZero` + +*** + +#### ~~lt()~~ + +> **lt**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L95) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lt` + +*** + +#### ~~lte()~~ + +> **lte**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L100) + +##### Type Parameters + +• **T** + +##### Parameters + +###### value + +`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` + +##### Returns + +`boolean` + +##### Inherited from + +`DecimalWrapper.lte` + +*** + +#### ~~toApr()~~ + +> **toApr**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L21) + +##### Returns + +`bigint` + +##### Inherited from + +`DecimalWrapper.toBigInt` + +*** + +#### ~~toDecimal()~~ + +> **toDecimal**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L43) + +##### Returns + +`Decimal` + +##### Inherited from + +`DecimalWrapper.toDecimal` + +*** + +#### ~~toFloat()~~ + +> **toFloat**(): `number` + +Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L47) + +##### Returns + +`number` + +##### Inherited from + +`DecimalWrapper.toFloat` + +*** + +#### ~~toPercent()~~ + +> **toPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L17) + +##### Returns + +`string` + +##### Inherited from + +`DecimalWrapper.toString` + +*** + +#### ~~fromApr()~~ + +> `static` **fromApr**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L188) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromAprPercent()~~ + +> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L194) + +##### Parameters + +###### apr + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromFloat()~~ + +> `static` **fromFloat**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L180) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) + +*** + +#### ~~fromPercent()~~ + +> `static` **fromPercent**(`number`): [`Rate`](#class-rate) + +Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L184) + +##### Parameters + +###### number + +`Numeric` + +##### Returns + +[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md new file mode 100644 index 0000000..d54b0f0 --- /dev/null +++ b/docs/classes/_Reports.md @@ -0,0 +1,178 @@ + +## Class: Reports + +Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L34) + +### Extends + +- `Entity` + +### Properties + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L39) + +### Methods + +#### assetList() + +> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L73) + +##### Parameters + +###### filter? + +[`AssetListReportFilter`](#type-assetlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> + +*** + +#### assetTransactions() + +> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L61) + +##### Parameters + +###### filter? + +[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> + +*** + +#### balanceSheet() + +> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L45) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> + +*** + +#### cashflow() + +> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L49) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> + +*** + +#### feeTransactions() + +> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L69) + +##### Parameters + +###### filter? + +[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> + +*** + +#### investorList() + +> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L77) + +##### Parameters + +###### filter? + +[`InvestorListReportFilter`](#type-investorlistreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> + +*** + +#### investorTransactions() + +> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L57) + +##### Parameters + +###### filter? + +[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) + +##### Returns + +[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> + +*** + +#### profitAndLoss() + +> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L53) + +##### Parameters + +###### filter? + +[`ReportFilter`](#type-reportfilter) + +##### Returns + +[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> + +*** + +#### tokenPrice() + +> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> + +Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L65) + +##### Parameters + +###### filter? + +[`TokenPriceReportFilter`](#type-tokenpricereportfilter) + +##### Returns + +[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md new file mode 100644 index 0000000..5abd0a9 --- /dev/null +++ b/docs/classes/_Vault.md @@ -0,0 +1,227 @@ + +## Class: Vault + +Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L19) + +Query and interact with a vault, which is the main entry point for investing and redeeming funds. +A vault is the combination of a network, a pool, a tranche and an investment currency. + +### Extends + +- `Entity` + +### Properties + +#### address + +> **address**: `` `0x${string}` `` + +Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L30) + +The contract address of the vault. + +*** + +#### chainId + +> **chainId**: `number` + +Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L35) + +### Methods + +#### allowance() + +> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> + +Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L84) + +Get the allowance of the investment currency for the CentrifugeRouter, +which is the contract that moves funds into the vault on behalf of the investor. + +##### Parameters + +###### owner + +`string` + +The address of the owner + +##### Returns + +[`Query`](#type-query)\<[`Currency`](#class-currency)\> + +*** + +#### cancelInvestOrder() + +> **cancelInvestOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L320) + +Cancel an open investment order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### cancelRedeemOrder() + +> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L369) + +Cancel an open redemption order. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### claim() + +> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L395) + +Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. + +##### Parameters + +###### receiver? + +`string` + +The address that should receive the funds. If not provided, the investor's address is used. + +###### controller? + +`string` + +The address of the user that has invested. Allows someone else to claim on behalf of the user + if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseInvestOrder() + +> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L239) + +Place an order to invest funds in the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### investAmount + +`NumberInput` + +The amount to invest in the vault + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### increaseRedeemOrder() + +> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) + +Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L344) + +Place an order to redeem funds from the vault. If an order exists, it will increase the amount. + +##### Parameters + +###### redeemAmount + +`NumberInput` + +The amount of shares to redeem + +##### Returns + +[`Transaction`](#type-transaction) + +*** + +#### investment() + +> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L128) + +Get the details of the investment of an investor in the vault and any pending investments or redemptions. + +##### Parameters + +###### investor + +`string` + +The address of the investor + +##### Returns + +[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> + +*** + +#### investmentCurrency() + +> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L68) + +Get the details of the investment currency. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +*** + +#### shareCurrency() + +> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> + +Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L75) + +Get the details of the share token. + +##### Returns + +[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md new file mode 100644 index 0000000..e8e3daf --- /dev/null +++ b/docs/type-aliases/_AssetListReport.md @@ -0,0 +1,6 @@ + +## Type: AssetListReport + +> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) + +Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md new file mode 100644 index 0000000..a607ae6 --- /dev/null +++ b/docs/type-aliases/_AssetListReportBase.md @@ -0,0 +1,24 @@ + +## Type: AssetListReportBase + +> **AssetListReportBase**: `object` + +Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L231) + +### Type declaration + +#### assetId + +> **assetId**: `string` + +#### presentValue + +> **presentValue**: [`Currency`](#class-currency) \| `undefined` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md new file mode 100644 index 0000000..e81702e --- /dev/null +++ b/docs/type-aliases/_AssetListReportFilter.md @@ -0,0 +1,20 @@ + +## Type: AssetListReportFilter + +> **AssetListReportFilter**: `object` + +Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L267) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### status? + +> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md new file mode 100644 index 0000000..b651d62 --- /dev/null +++ b/docs/type-aliases/_AssetListReportPrivateCredit.md @@ -0,0 +1,64 @@ + +## Type: AssetListReportPrivateCredit + +> **AssetListReportPrivateCredit**: `object` + +Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L248) + +### Type declaration + +#### advanceRate + +> **advanceRate**: [`Rate`](#class-rate) \| `undefined` + +#### collateralValue + +> **collateralValue**: [`Currency`](#class-currency) \| `undefined` + +#### discountRate + +> **discountRate**: [`Rate`](#class-rate) \| `undefined` + +#### lossGivenDefault + +> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### originationDate + +> **originationDate**: `number` \| `undefined` + +#### outstandingInterest + +> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` + +#### outstandingPrincipal + +> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### probabilityOfDefault + +> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` + +#### repaidInterest + +> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` + +#### repaidPrincipal + +> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` + +#### repaidUnscheduled + +> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"privateCredit"` + +#### valuationMethod + +> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md new file mode 100644 index 0000000..32ab0bd --- /dev/null +++ b/docs/type-aliases/_AssetListReportPublicCredit.md @@ -0,0 +1,36 @@ + +## Type: AssetListReportPublicCredit + +> **AssetListReportPublicCredit**: `object` + +Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L238) + +### Type declaration + +#### currentPrice + +> **currentPrice**: [`Price`](#class-price) \| `undefined` + +#### faceValue + +> **faceValue**: [`Currency`](#class-currency) \| `undefined` + +#### maturityDate + +> **maturityDate**: `string` \| `undefined` + +#### outstandingQuantity + +> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` + +#### realizedProfit + +> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` + +#### subtype + +> **subtype**: `"publicCredit"` + +#### unrealizedProfit + +> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md new file mode 100644 index 0000000..9b9f4cc --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReport.md @@ -0,0 +1,36 @@ + +## Type: AssetTransactionReport + +> **AssetTransactionReport**: `object` + +Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L167) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### assetId + +> **assetId**: `string` + +#### epoch + +> **epoch**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `AssetTransactionType` + +#### type + +> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md new file mode 100644 index 0000000..7e42f61 --- /dev/null +++ b/docs/type-aliases/_AssetTransactionReportFilter.md @@ -0,0 +1,24 @@ + +## Type: AssetTransactionReportFilter + +> **AssetTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L177) + +### Type declaration + +#### assetId? + +> `optional` **assetId**: `string` + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md new file mode 100644 index 0000000..23548b1 --- /dev/null +++ b/docs/type-aliases/_BalanceSheetReport.md @@ -0,0 +1,46 @@ + +## Type: BalanceSheetReport + +> **BalanceSheetReport**: `object` + +Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L36) + +Balance sheet type + +### Type declaration + +#### accruedFees + +> **accruedFees**: [`Currency`](#class-currency) + +#### assetValuation + +> **assetValuation**: [`Currency`](#class-currency) + +#### netAssetValue + +> **netAssetValue**: [`Currency`](#class-currency) + +#### offchainCash + +> **offchainCash**: [`Currency`](#class-currency) + +#### onchainReserve + +> **onchainReserve**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCapital? + +> `optional` **totalCapital**: [`Currency`](#class-currency) + +#### tranches? + +> `optional` **tranches**: `object`[] + +#### type + +> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md new file mode 100644 index 0000000..a68ddf6 --- /dev/null +++ b/docs/type-aliases/_CashflowReport.md @@ -0,0 +1,6 @@ + +## Type: CashflowReport + +> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) + +Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md new file mode 100644 index 0000000..a88d5a7 --- /dev/null +++ b/docs/type-aliases/_CashflowReportBase.md @@ -0,0 +1,62 @@ + +## Type: CashflowReportBase + +> **CashflowReportBase**: `object` + +Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L63) + +Cashflow types + +### Type declaration + +#### activitiesCashflow + +> **activitiesCashflow**: [`Currency`](#class-currency) + +#### endCashBalance + +> **endCashBalance**: `object` + +##### endCashBalance.balance + +> **balance**: [`Currency`](#class-currency) + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### investments + +> **investments**: [`Currency`](#class-currency) + +#### netCashflowAfterFees + +> **netCashflowAfterFees**: [`Currency`](#class-currency) + +#### netCashflowAsset + +> **netCashflowAsset**: [`Currency`](#class-currency) + +#### principalPayments + +> **principalPayments**: [`Currency`](#class-currency) + +#### redemptions + +> **redemptions**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalCashflow + +> **totalCashflow**: [`Currency`](#class-currency) + +#### type + +> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md new file mode 100644 index 0000000..9be53e7 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPrivateCredit.md @@ -0,0 +1,16 @@ + +## Type: CashflowReportPrivateCredit + +> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L84) + +### Type declaration + +#### assetFinancing? + +> `optional` **assetFinancing**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md new file mode 100644 index 0000000..30e6bc2 --- /dev/null +++ b/docs/type-aliases/_CashflowReportPublicCredit.md @@ -0,0 +1,20 @@ + +## Type: CashflowReportPublicCredit + +> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` + +Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L78) + +### Type declaration + +#### assetPurchases? + +> `optional` **assetPurchases**: [`Currency`](#class-currency) + +#### realizedPL? + +> `optional` **realizedPL**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md new file mode 100644 index 0000000..c6657c6 --- /dev/null +++ b/docs/type-aliases/_Client.md @@ -0,0 +1,6 @@ + +## Type: Client + +> **Client**: `PublicClient`\<`any`, `Chain`\> + +Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md new file mode 100644 index 0000000..cca27b6 --- /dev/null +++ b/docs/type-aliases/_Config.md @@ -0,0 +1,24 @@ + +## Type: Config + +> **Config**: `object` + +Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/index.ts#L3) + +### Type declaration + +#### environment + +> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` + +#### indexerUrl + +> **indexerUrl**: `string` + +#### ipfsUrl + +> **ipfsUrl**: `string` + +#### rpcUrls? + +> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md new file mode 100644 index 0000000..84bf5fa --- /dev/null +++ b/docs/type-aliases/_CurrencyMetadata.md @@ -0,0 +1,32 @@ + +## Type: CurrencyMetadata + +> **CurrencyMetadata**: `object` + +Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/config/lp.ts#L43) + +### Type declaration + +#### address + +> **address**: [`HexString`](#type-hexstring) + +#### chainId + +> **chainId**: `number` + +#### decimals + +> **decimals**: `number` + +#### name + +> **name**: `string` + +#### supportsPermit + +> **supportsPermit**: `boolean` + +#### symbol + +> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md new file mode 100644 index 0000000..59d222b --- /dev/null +++ b/docs/type-aliases/_EIP1193ProviderLike.md @@ -0,0 +1,20 @@ + +## Type: EIP1193ProviderLike + +> **EIP1193ProviderLike**: `object` + +Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L50) + +### Type declaration + +#### request() + +##### Parameters + +###### args + +...`any` + +##### Returns + +`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md new file mode 100644 index 0000000..6dd4fe4 --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReport.md @@ -0,0 +1,24 @@ + +## Type: FeeTransactionReport + +> **FeeTransactionReport**: `object` + +Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L191) + +### Type declaration + +#### amount + +> **amount**: [`Currency`](#class-currency) + +#### feeId + +> **feeId**: `string` + +#### timestamp + +> **timestamp**: `string` + +#### type + +> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md new file mode 100644 index 0000000..0f5774c --- /dev/null +++ b/docs/type-aliases/_FeeTransactionReportFilter.md @@ -0,0 +1,20 @@ + +## Type: FeeTransactionReportFilter + +> **FeeTransactionReportFilter**: `object` + +Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L198) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### to? + +> `optional` **to**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md new file mode 100644 index 0000000..1547fd0 --- /dev/null +++ b/docs/type-aliases/_GroupBy.md @@ -0,0 +1,6 @@ + +## Type: GroupBy + +> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` + +Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md new file mode 100644 index 0000000..758a20a --- /dev/null +++ b/docs/type-aliases/_HexString.md @@ -0,0 +1,6 @@ + +## Type: HexString + +> **HexString**: `` `0x${string}` `` + +Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md new file mode 100644 index 0000000..68f3e89 --- /dev/null +++ b/docs/type-aliases/_InvestorListReport.md @@ -0,0 +1,40 @@ + +## Type: InvestorListReport + +> **InvestorListReport**: `object` + +Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L279) + +### Type declaration + +#### accountId + +> **accountId**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` \| `"all"` + +#### evmAddress? + +> `optional` **evmAddress**: `string` + +#### pendingInvest + +> **pendingInvest**: [`Currency`](#class-currency) + +#### pendingRedeem + +> **pendingRedeem**: [`Currency`](#class-currency) + +#### poolPercentage + +> **poolPercentage**: [`Rate`](#class-rate) + +#### position + +> **position**: [`Currency`](#class-currency) + +#### type + +> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md new file mode 100644 index 0000000..85728a9 --- /dev/null +++ b/docs/type-aliases/_InvestorListReportFilter.md @@ -0,0 +1,28 @@ + +## Type: InvestorListReportFilter + +> **InvestorListReportFilter**: `object` + +Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L290) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### trancheId? + +> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md new file mode 100644 index 0000000..f8c65c6 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReport.md @@ -0,0 +1,52 @@ + +## Type: InvestorTransactionsReport + +> **InvestorTransactionsReport**: `object` + +Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L137) + +### Type declaration + +#### account + +> **account**: `string` + +#### chainId + +> **chainId**: `number` \| `"centrifuge"` + +#### currencyAmount + +> **currencyAmount**: [`Currency`](#class-currency) + +#### epoch + +> **epoch**: `string` + +#### price + +> **price**: [`Price`](#class-price) + +#### timestamp + +> **timestamp**: `string` + +#### trancheTokenAmount + +> **trancheTokenAmount**: [`Currency`](#class-currency) + +#### trancheTokenId + +> **trancheTokenId**: `string` + +#### transactionHash + +> **transactionHash**: `string` + +#### transactionType + +> **transactionType**: `SubqueryInvestorTransactionType` + +#### type + +> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md new file mode 100644 index 0000000..a016600 --- /dev/null +++ b/docs/type-aliases/_InvestorTransactionsReportFilter.md @@ -0,0 +1,32 @@ + +## Type: InvestorTransactionsReportFilter + +> **InvestorTransactionsReportFilter**: `object` + +Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L151) + +### Type declaration + +#### address? + +> `optional` **address**: `string` + +#### from? + +> `optional` **from**: `string` + +#### network? + +> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` + +#### to? + +> `optional` **to**: `string` + +#### tokenId? + +> `optional` **tokenId**: `string` + +#### transactionType? + +> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md new file mode 100644 index 0000000..0614a64 --- /dev/null +++ b/docs/type-aliases/_OperationConfirmedStatus.md @@ -0,0 +1,24 @@ + +## Type: OperationConfirmedStatus + +> **OperationConfirmedStatus**: `object` + +Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L31) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### receipt + +> **receipt**: `TransactionReceipt` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md new file mode 100644 index 0000000..a23d035 --- /dev/null +++ b/docs/type-aliases/_OperationPendingStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationPendingStatus + +> **OperationPendingStatus**: `object` + +Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L26) + +### Type declaration + +#### hash + +> **hash**: [`HexString`](#type-hexstring) + +#### title + +> **title**: `string` + +#### type + +> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md new file mode 100644 index 0000000..f222c05 --- /dev/null +++ b/docs/type-aliases/_OperationSignedMessageStatus.md @@ -0,0 +1,20 @@ + +## Type: OperationSignedMessageStatus + +> **OperationSignedMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L21) + +### Type declaration + +#### signed + +> **signed**: `any` + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md new file mode 100644 index 0000000..535c106 --- /dev/null +++ b/docs/type-aliases/_OperationSigningMessageStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningMessageStatus + +> **OperationSigningMessageStatus**: `object` + +Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L17) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md new file mode 100644 index 0000000..fc2672e --- /dev/null +++ b/docs/type-aliases/_OperationSigningStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSigningStatus + +> **OperationSigningStatus**: `object` + +Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L13) + +### Type declaration + +#### title + +> **title**: `string` + +#### type + +> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md new file mode 100644 index 0000000..995775f --- /dev/null +++ b/docs/type-aliases/_OperationStatus.md @@ -0,0 +1,6 @@ + +## Type: OperationStatus + +> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) + +Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md new file mode 100644 index 0000000..b99af62 --- /dev/null +++ b/docs/type-aliases/_OperationStatusType.md @@ -0,0 +1,6 @@ + +## Type: OperationStatusType + +> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` + +Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md new file mode 100644 index 0000000..40abc11 --- /dev/null +++ b/docs/type-aliases/_OperationSwitchChainStatus.md @@ -0,0 +1,16 @@ + +## Type: OperationSwitchChainStatus + +> **OperationSwitchChainStatus**: `object` + +Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L37) + +### Type declaration + +#### chainId + +> **chainId**: `number` + +#### type + +> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md new file mode 100644 index 0000000..dc64020 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReport.md @@ -0,0 +1,6 @@ + +## Type: ProfitAndLossReport + +> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) + +Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md new file mode 100644 index 0000000..991fc5f --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportBase.md @@ -0,0 +1,42 @@ + +## Type: ProfitAndLossReportBase + +> **ProfitAndLossReportBase**: `object` + +Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L100) + +Profit and loss types + +### Type declaration + +#### fees + +> **fees**: `object`[] + +#### interestPayments + +> **interestPayments**: [`Currency`](#class-currency) + +#### otherPayments + +> **otherPayments**: [`Currency`](#class-currency) + +#### profitAndLossFromAsset + +> **profitAndLossFromAsset**: [`Currency`](#class-currency) + +#### timestamp + +> **timestamp**: `string` + +#### totalExpenses + +> **totalExpenses**: [`Currency`](#class-currency) + +#### totalProfitAndLoss + +> **totalProfitAndLoss**: [`Currency`](#class-currency) + +#### type + +> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md new file mode 100644 index 0000000..b352a1f --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md @@ -0,0 +1,20 @@ + +## Type: ProfitAndLossReportPrivateCredit + +> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L116) + +### Type declaration + +#### assetWriteOffs + +> **assetWriteOffs**: [`Currency`](#class-currency) + +#### interestAccrued + +> **interestAccrued**: [`Currency`](#class-currency) + +#### subtype + +> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md new file mode 100644 index 0000000..927a3e5 --- /dev/null +++ b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md @@ -0,0 +1,16 @@ + +## Type: ProfitAndLossReportPublicCredit + +> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` + +Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L111) + +### Type declaration + +#### subtype + +> **subtype**: `"publicCredit"` + +#### totalIncome + +> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md new file mode 100644 index 0000000..0ebba47 --- /dev/null +++ b/docs/type-aliases/_Query.md @@ -0,0 +1,20 @@ + +## Type: Query + +> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` + +Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/query.ts#L15) + +### Type declaration + +#### toPromise() + +> **toPromise**: () => `Promise`\<`T`\> + +##### Returns + +`Promise`\<`T`\> + +### Type Parameters + +• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md new file mode 100644 index 0000000..bd737c3 --- /dev/null +++ b/docs/type-aliases/_ReportFilter.md @@ -0,0 +1,20 @@ + +## Type: ReportFilter + +> **ReportFilter**: `object` + +Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L13) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md new file mode 100644 index 0000000..f82bbce --- /dev/null +++ b/docs/type-aliases/_Signer.md @@ -0,0 +1,6 @@ + +## Type: Signer + +> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` + +Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md new file mode 100644 index 0000000..1977448 --- /dev/null +++ b/docs/type-aliases/_TokenPriceReport.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReport + +> **TokenPriceReport**: `object` + +Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L211) + +### Type declaration + +#### timestamp + +> **timestamp**: `string` + +#### tranches + +> **tranches**: `object`[] + +#### type + +> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md new file mode 100644 index 0000000..10484fa --- /dev/null +++ b/docs/type-aliases/_TokenPriceReportFilter.md @@ -0,0 +1,20 @@ + +## Type: TokenPriceReportFilter + +> **TokenPriceReportFilter**: `object` + +Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L217) + +### Type declaration + +#### from? + +> `optional` **from**: `string` + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +#### to? + +> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md new file mode 100644 index 0000000..d2fa5a6 --- /dev/null +++ b/docs/type-aliases/_Transaction.md @@ -0,0 +1,6 @@ + +## Type: Transaction + +> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> + +Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L64) From 216f00e20dd3a7bd46cbc9a07a2fa1e84423cd4f Mon Sep 17 00:00:00 2001 From: sophian Date: Wed, 15 Jan 2025 16:33:30 -0500 Subject: [PATCH 41/42] Test deployment without pushing docs/ folder --- .github/workflows/update-docs.yml | 4 - docs/classes/_Centrifuge.md | 224 ---------- docs/classes/_Currency.md | 370 ----------------- docs/classes/_Perquintill.md | 322 --------------- docs/classes/_Pool.md | 136 ------ docs/classes/_PoolNetwork.md | 202 --------- docs/classes/_Price.md | 362 ---------------- docs/classes/_Rate.md | 386 ------------------ docs/classes/_Reports.md | 178 -------- docs/classes/_Vault.md | 227 ---------- docs/type-aliases/_AssetListReport.md | 6 - docs/type-aliases/_AssetListReportBase.md | 24 -- docs/type-aliases/_AssetListReportFilter.md | 20 - .../_AssetListReportPrivateCredit.md | 64 --- .../_AssetListReportPublicCredit.md | 36 -- docs/type-aliases/_AssetTransactionReport.md | 36 -- .../_AssetTransactionReportFilter.md | 24 -- docs/type-aliases/_BalanceSheetReport.md | 46 --- docs/type-aliases/_CashflowReport.md | 6 - docs/type-aliases/_CashflowReportBase.md | 62 --- .../_CashflowReportPrivateCredit.md | 16 - .../_CashflowReportPublicCredit.md | 20 - docs/type-aliases/_Client.md | 6 - docs/type-aliases/_Config.md | 24 -- docs/type-aliases/_CurrencyMetadata.md | 32 -- docs/type-aliases/_EIP1193ProviderLike.md | 20 - docs/type-aliases/_FeeTransactionReport.md | 24 -- .../_FeeTransactionReportFilter.md | 20 - docs/type-aliases/_GroupBy.md | 6 - docs/type-aliases/_HexString.md | 6 - docs/type-aliases/_InvestorListReport.md | 40 -- .../type-aliases/_InvestorListReportFilter.md | 28 -- .../_InvestorTransactionsReport.md | 52 --- .../_InvestorTransactionsReportFilter.md | 32 -- .../type-aliases/_OperationConfirmedStatus.md | 24 -- docs/type-aliases/_OperationPendingStatus.md | 20 - .../_OperationSignedMessageStatus.md | 20 - .../_OperationSigningMessageStatus.md | 16 - docs/type-aliases/_OperationSigningStatus.md | 16 - docs/type-aliases/_OperationStatus.md | 6 - docs/type-aliases/_OperationStatusType.md | 6 - .../_OperationSwitchChainStatus.md | 16 - docs/type-aliases/_ProfitAndLossReport.md | 6 - docs/type-aliases/_ProfitAndLossReportBase.md | 42 -- .../_ProfitAndLossReportPrivateCredit.md | 20 - .../_ProfitAndLossReportPublicCredit.md | 16 - docs/type-aliases/_Query.md | 20 - docs/type-aliases/_ReportFilter.md | 20 - docs/type-aliases/_Signer.md | 6 - docs/type-aliases/_TokenPriceReport.md | 20 - docs/type-aliases/_TokenPriceReportFilter.md | 20 - docs/type-aliases/_Transaction.md | 6 - 52 files changed, 3361 deletions(-) delete mode 100644 docs/classes/_Centrifuge.md delete mode 100644 docs/classes/_Currency.md delete mode 100644 docs/classes/_Perquintill.md delete mode 100644 docs/classes/_Pool.md delete mode 100644 docs/classes/_PoolNetwork.md delete mode 100644 docs/classes/_Price.md delete mode 100644 docs/classes/_Rate.md delete mode 100644 docs/classes/_Reports.md delete mode 100644 docs/classes/_Vault.md delete mode 100644 docs/type-aliases/_AssetListReport.md delete mode 100644 docs/type-aliases/_AssetListReportBase.md delete mode 100644 docs/type-aliases/_AssetListReportFilter.md delete mode 100644 docs/type-aliases/_AssetListReportPrivateCredit.md delete mode 100644 docs/type-aliases/_AssetListReportPublicCredit.md delete mode 100644 docs/type-aliases/_AssetTransactionReport.md delete mode 100644 docs/type-aliases/_AssetTransactionReportFilter.md delete mode 100644 docs/type-aliases/_BalanceSheetReport.md delete mode 100644 docs/type-aliases/_CashflowReport.md delete mode 100644 docs/type-aliases/_CashflowReportBase.md delete mode 100644 docs/type-aliases/_CashflowReportPrivateCredit.md delete mode 100644 docs/type-aliases/_CashflowReportPublicCredit.md delete mode 100644 docs/type-aliases/_Client.md delete mode 100644 docs/type-aliases/_Config.md delete mode 100644 docs/type-aliases/_CurrencyMetadata.md delete mode 100644 docs/type-aliases/_EIP1193ProviderLike.md delete mode 100644 docs/type-aliases/_FeeTransactionReport.md delete mode 100644 docs/type-aliases/_FeeTransactionReportFilter.md delete mode 100644 docs/type-aliases/_GroupBy.md delete mode 100644 docs/type-aliases/_HexString.md delete mode 100644 docs/type-aliases/_InvestorListReport.md delete mode 100644 docs/type-aliases/_InvestorListReportFilter.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReport.md delete mode 100644 docs/type-aliases/_InvestorTransactionsReportFilter.md delete mode 100644 docs/type-aliases/_OperationConfirmedStatus.md delete mode 100644 docs/type-aliases/_OperationPendingStatus.md delete mode 100644 docs/type-aliases/_OperationSignedMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningMessageStatus.md delete mode 100644 docs/type-aliases/_OperationSigningStatus.md delete mode 100644 docs/type-aliases/_OperationStatus.md delete mode 100644 docs/type-aliases/_OperationStatusType.md delete mode 100644 docs/type-aliases/_OperationSwitchChainStatus.md delete mode 100644 docs/type-aliases/_ProfitAndLossReport.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportBase.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPrivateCredit.md delete mode 100644 docs/type-aliases/_ProfitAndLossReportPublicCredit.md delete mode 100644 docs/type-aliases/_Query.md delete mode 100644 docs/type-aliases/_ReportFilter.md delete mode 100644 docs/type-aliases/_Signer.md delete mode 100644 docs/type-aliases/_TokenPriceReport.md delete mode 100644 docs/type-aliases/_TokenPriceReportFilter.md delete mode 100644 docs/type-aliases/_Transaction.md diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 3de6a8f..5b4f869 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -43,10 +43,6 @@ jobs: echo "has_changes=false" >> "$GITHUB_OUTPUT" fi - - name: Push the changes - if: steps.commit_check.outputs.has_changes == 'true' - run: git push - - name: Install dependencies if: steps.commit_check.outputs.has_changes == 'true' run: yarn add simple-git diff --git a/docs/classes/_Centrifuge.md b/docs/classes/_Centrifuge.md deleted file mode 100644 index a399073..0000000 --- a/docs/classes/_Centrifuge.md +++ /dev/null @@ -1,224 +0,0 @@ - -## Class: Centrifuge - -Defined in: [src/Centrifuge.ts:72](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L72) - -### Constructors - -#### new Centrifuge() - -> **new Centrifuge**(`config`): [`Centrifuge`](#class-centrifuge) - -Defined in: [src/Centrifuge.ts:97](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L97) - -##### Parameters - -###### config - -`Partial`\<[`Config`](#type-config)\> = `{}` - -##### Returns - -[`Centrifuge`](#class-centrifuge) - -### Accessors - -#### chains - -##### Get Signature - -> **get** **chains**(): `number`[] - -Defined in: [src/Centrifuge.ts:82](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L82) - -###### Returns - -`number`[] - -*** - -#### config - -##### Get Signature - -> **get** **config**(): `DerivedConfig` - -Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L74) - -###### Returns - -`DerivedConfig` - -*** - -#### signer - -##### Get Signature - -> **get** **signer**(): `null` \| [`Signer`](#type-signer) - -Defined in: [src/Centrifuge.ts:93](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L93) - -###### Returns - -`null` \| [`Signer`](#type-signer) - -### Methods - -#### account() - -> **account**(`address`, `chainId`?): [`Query`](#type-query)\<`Account`\> - -Defined in: [src/Centrifuge.ts:123](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L123) - -##### Parameters - -###### address - -`string` - -###### chainId? - -`number` - -##### Returns - -[`Query`](#type-query)\<`Account`\> - -*** - -#### balance() - -> **balance**(`currency`, `owner`, `chainId`?): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Centrifuge.ts:168](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L168) - -Get the balance of an ERC20 token for a given owner. - -##### Parameters - -###### currency - -`string` - -The token address - -###### owner - -`string` - -The owner address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### currency() - -> **currency**(`address`, `chainId`?): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Centrifuge.ts:132](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L132) - -Get the metadata for an ERC20 token - -##### Parameters - -###### address - -`string` - -The token address - -###### chainId? - -`number` - -The chain ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### getChainConfig() - -> **getChainConfig**(`chainId`?): `Chain` - -Defined in: [src/Centrifuge.ts:85](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L85) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`Chain` - -*** - -#### getClient() - -> **getClient**(`chainId`?): `undefined` \| \{\} - -Defined in: [src/Centrifuge.ts:79](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L79) - -##### Parameters - -###### chainId? - -`number` - -##### Returns - -`undefined` \| \{\} - -*** - -#### pool() - -> **pool**(`id`, `metadataHash`?): [`Query`](#type-query)\<[`Pool`](#class-pool)\> - -Defined in: [src/Centrifuge.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L119) - -##### Parameters - -###### id - -`string` | `number` - -###### metadataHash? - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Pool`](#class-pool)\> - -*** - -#### setSigner() - -> **setSigner**(`signer`): `void` - -Defined in: [src/Centrifuge.ts:90](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Centrifuge.ts#L90) - -##### Parameters - -###### signer - -`null` | [`Signer`](#type-signer) - -##### Returns - -`void` diff --git a/docs/classes/_Currency.md b/docs/classes/_Currency.md deleted file mode 100644 index e55d1f9..0000000 --- a/docs/classes/_Currency.md +++ /dev/null @@ -1,370 +0,0 @@ - -## Class: Currency - -Defined in: [src/utils/BigInt.ts:124](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L124) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Currency() - -> **new Currency**(`value`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Currency`](#class-currency) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ZERO - -> `static` **ZERO**: [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:129](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L129) - -### Methods - -#### add() - -> **add**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:131](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L131) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### div() - -> **div**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:143](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L143) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:139](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L139) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) | [`Price`](#class-price) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### sub() - -> **sub**(`value`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:135](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L135) - -##### Parameters - -###### value - -`bigint` | [`Currency`](#class-currency) - -##### Returns - -[`Currency`](#class-currency) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`num`, `decimals`): [`Currency`](#class-currency) - -Defined in: [src/utils/BigInt.ts:125](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L125) - -##### Parameters - -###### num - -`Numeric` - -###### decimals - -`number` - -##### Returns - -[`Currency`](#class-currency) diff --git a/docs/classes/_Perquintill.md b/docs/classes/_Perquintill.md deleted file mode 100644 index 429288f..0000000 --- a/docs/classes/_Perquintill.md +++ /dev/null @@ -1,322 +0,0 @@ - -## Class: ~~Perquintill~~ - -Defined in: [src/utils/BigInt.ts:246](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L246) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Perquintill() - -> **new Perquintill**(`value`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:249](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L249) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:247](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L247) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:261](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L261) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:253](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L253) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Perquintill`](#class-perquintill) - -Defined in: [src/utils/BigInt.ts:257](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L257) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Perquintill`](#class-perquintill) diff --git a/docs/classes/_Pool.md b/docs/classes/_Pool.md deleted file mode 100644 index fc188a4..0000000 --- a/docs/classes/_Pool.md +++ /dev/null @@ -1,136 +0,0 @@ - -## Class: Pool - -Defined in: [src/Pool.ts:8](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L8) - -### Extends - -- `Entity` - -### Properties - -#### id - -> **id**: `string` - -Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L12) - -*** - -#### metadataHash? - -> `optional` **metadataHash**: `string` - -Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L13) - -### Accessors - -#### reports - -##### Get Signature - -> **get** **reports**(): [`Reports`](#class-reports) - -Defined in: [src/Pool.ts:18](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L18) - -###### Returns - -[`Reports`](#class-reports) - -### Methods - -#### activeNetworks() - -> **activeNetworks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:79](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L79) - -Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### metadata() - -> **metadata**(): [`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -Defined in: [src/Pool.ts:22](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L22) - -##### Returns - -[`Query`](#type-query)\<`PoolMetadata`\> \| [`Query`](#type-query)\<`null`\> - -*** - -#### network() - -> **network**(`chainId`): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -Defined in: [src/Pool.ts:64](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L64) - -Get a specific network where a pool can potentially be deployed. - -##### Parameters - -###### chainId - -`number` - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)\> - -*** - -#### networks() - -> **networks**(): [`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -Defined in: [src/Pool.ts:51](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L51) - -Get all networks where a pool can potentially be deployed. - -##### Returns - -[`Query`](#type-query)\<[`PoolNetwork`](#class-poolnetwork)[]\> - -*** - -#### trancheIds() - -> **trancheIds**(): [`Query`](#type-query)\<`string`[]\> - -Defined in: [src/Pool.ts:28](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L28) - -##### Returns - -[`Query`](#type-query)\<`string`[]\> - -*** - -#### vault() - -> **vault**(`chainId`, `trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/Pool.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Pool.ts#L100) - -##### Parameters - -###### chainId - -`number` - -###### trancheId - -`string` - -###### asset - -`string` - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> diff --git a/docs/classes/_PoolNetwork.md b/docs/classes/_PoolNetwork.md deleted file mode 100644 index 4c7275e..0000000 --- a/docs/classes/_PoolNetwork.md +++ /dev/null @@ -1,202 +0,0 @@ - -## Class: PoolNetwork - -Defined in: [src/PoolNetwork.ts:16](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L16) - -Query and interact with a pool on a specific network. - -### Extends - -- `Entity` - -### Properties - -#### chainId - -> **chainId**: `number` - -Defined in: [src/PoolNetwork.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L21) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L20) - -### Methods - -#### canTrancheBeDeployed() - -> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L269) - -Get whether a pool is active and the tranche token can be deployed. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### deployTranche() - -> **deployTranche**(`trancheId`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:306](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L306) - -Deploy a tranche token for the pool. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### deployVault() - -> **deployVault**(`trancheId`, `currencyAddress`): [`Transaction`](#type-transaction) - -Defined in: [src/PoolNetwork.ts:330](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L330) - -Deploy a vault for a specific tranche x currency combination. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### currencyAddress - -`string` - -The investment currency address - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### isActive() - -> **isActive**(): [`Query`](#type-query)\<`boolean`\> - -Defined in: [src/PoolNetwork.ts:232](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L232) - -Get whether the pool is active on this network. It's a prerequisite for deploying vaults, -and doesn't indicate whether any vaults have been deployed. - -##### Returns - -[`Query`](#type-query)\<`boolean`\> - -*** - -#### shareCurrency() - -> **shareCurrency**(`trancheId`): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/PoolNetwork.ts:143](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L143) - -Get the details of the share token. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### vault() - -> **vault**(`trancheId`, `asset`): [`Query`](#type-query)\<[`Vault`](#class-vault)\> - -Defined in: [src/PoolNetwork.ts:215](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L215) - -Get a specific Vault for a given tranche and investment currency. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -###### asset - -`string` - -The investment currency address - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)\> - -*** - -#### vaults() - -> **vaults**(`trancheId`): [`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -Defined in: [src/PoolNetwork.ts:154](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L154) - -Get the deployed Vaults for a given tranche. There may exist one Vault for each allowed investment currency. -Vaults are used to submit/claim investments and redemptions. - -##### Parameters - -###### trancheId - -`string` - -The tranche ID - -##### Returns - -[`Query`](#type-query)\<[`Vault`](#class-vault)[]\> - -*** - -#### vaultsByTranche() - -> **vaultsByTranche**(): [`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -Defined in: [src/PoolNetwork.ts:198](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/PoolNetwork.ts#L198) - -Get all Vaults for all tranches in the pool. - -##### Returns - -[`Query`](#type-query)\<`Record`\<`string`, [`Vault`](#class-vault)\>\> - -An object of tranche ID to Vault. diff --git a/docs/classes/_Price.md b/docs/classes/_Price.md deleted file mode 100644 index 248f0a8..0000000 --- a/docs/classes/_Price.md +++ /dev/null @@ -1,362 +0,0 @@ - -## Class: Price - -Defined in: [src/utils/BigInt.ts:215](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L215) - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Price() - -> **new Price**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:218](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L218) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -##### Returns - -[`Price`](#class-price) - -##### Overrides - -`DecimalWrapper.constructor` - -### Properties - -#### decimals - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### value - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### decimals - -> `static` **decimals**: `number` = `18` - -Defined in: [src/utils/BigInt.ts:216](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L216) - -### Methods - -#### add() - -> **add**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:226](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L226) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### div() - -> **div**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:238](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L238) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### eq() - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### gt() - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### gte() - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### isZero() - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### lt() - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### lte() - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### mul() - -> **mul**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:234](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L234) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### sub() - -> **sub**(`value`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:230](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L230) - -##### Parameters - -###### value - -`bigint` | [`Price`](#class-price) - -##### Returns - -[`Price`](#class-price) - -*** - -#### toBigInt() - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### toDecimal() - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### toFloat() - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### toString() - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### fromFloat() - -> `static` **fromFloat**(`number`): [`Price`](#class-price) - -Defined in: [src/utils/BigInt.ts:222](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L222) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Price`](#class-price) diff --git a/docs/classes/_Rate.md b/docs/classes/_Rate.md deleted file mode 100644 index 0b6bbf4..0000000 --- a/docs/classes/_Rate.md +++ /dev/null @@ -1,386 +0,0 @@ - -## Class: ~~Rate~~ - -Defined in: [src/utils/BigInt.ts:177](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L177) - -### Deprecated - -### Extends - -- `DecimalWrapper` - -### Constructors - -#### new Rate() - -> **new Rate**(`value`, `decimals`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:29](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L29) - -##### Parameters - -###### value - -`bigint` | `Numeric` - -###### decimals - -`number` = `27` - -##### Returns - -[`Rate`](#class-rate) - -##### Inherited from - -`DecimalWrapper.constructor` - -### Properties - -#### ~~decimals~~ - -> `readonly` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:27](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L27) - -##### Inherited from - -`DecimalWrapper.decimals` - -*** - -#### ~~value~~ - -> `protected` **value**: `bigint` - -Defined in: [src/utils/BigInt.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L3) - -##### Inherited from - -`DecimalWrapper.value` - -*** - -#### ~~decimals~~ - -> `static` **decimals**: `number` = `27` - -Defined in: [src/utils/BigInt.ts:178](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L178) - -### Methods - -#### ~~eq()~~ - -> **eq**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L115) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.eq` - -*** - -#### ~~gt()~~ - -> **gt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:105](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L105) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gt` - -*** - -#### ~~gte()~~ - -> **gte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:110](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L110) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.gte` - -*** - -#### ~~isZero()~~ - -> **isZero**(): `boolean` - -Defined in: [src/utils/BigInt.ts:119](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L119) - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.isZero` - -*** - -#### ~~lt()~~ - -> **lt**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:95](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L95) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lt` - -*** - -#### ~~lte()~~ - -> **lte**\<`T`\>(`value`): `boolean` - -Defined in: [src/utils/BigInt.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L100) - -##### Type Parameters - -• **T** - -##### Parameters - -###### value - -`bigint` | `T` *extends* `BigIntWrapper` ? `T`\<`T`\> : `never` - -##### Returns - -`boolean` - -##### Inherited from - -`DecimalWrapper.lte` - -*** - -#### ~~toApr()~~ - -> **toApr**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:202](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L202) - -##### Returns - -`Decimal` - -*** - -#### ~~toAprPercent()~~ - -> **toAprPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L210) - -##### Returns - -`Decimal` - -*** - -#### ~~toBigInt()~~ - -> **toBigInt**(): `bigint` - -Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L21) - -##### Returns - -`bigint` - -##### Inherited from - -`DecimalWrapper.toBigInt` - -*** - -#### ~~toDecimal()~~ - -> **toDecimal**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L43) - -##### Returns - -`Decimal` - -##### Inherited from - -`DecimalWrapper.toDecimal` - -*** - -#### ~~toFloat()~~ - -> **toFloat**(): `number` - -Defined in: [src/utils/BigInt.ts:47](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L47) - -##### Returns - -`number` - -##### Inherited from - -`DecimalWrapper.toFloat` - -*** - -#### ~~toPercent()~~ - -> **toPercent**(): `Decimal` - -Defined in: [src/utils/BigInt.ts:198](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L198) - -##### Returns - -`Decimal` - -*** - -#### ~~toString()~~ - -> **toString**(): `string` - -Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L17) - -##### Returns - -`string` - -##### Inherited from - -`DecimalWrapper.toString` - -*** - -#### ~~fromApr()~~ - -> `static` **fromApr**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:188](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L188) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromAprPercent()~~ - -> `static` **fromAprPercent**(`apr`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:194](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L194) - -##### Parameters - -###### apr - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromFloat()~~ - -> `static` **fromFloat**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:180](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L180) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) - -*** - -#### ~~fromPercent()~~ - -> `static` **fromPercent**(`number`): [`Rate`](#class-rate) - -Defined in: [src/utils/BigInt.ts:184](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/BigInt.ts#L184) - -##### Parameters - -###### number - -`Numeric` - -##### Returns - -[`Rate`](#class-rate) diff --git a/docs/classes/_Reports.md b/docs/classes/_Reports.md deleted file mode 100644 index d54b0f0..0000000 --- a/docs/classes/_Reports.md +++ /dev/null @@ -1,178 +0,0 @@ - -## Class: Reports - -Defined in: [src/Reports/index.ts:34](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L34) - -### Extends - -- `Entity` - -### Properties - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Reports/index.ts:39](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L39) - -### Methods - -#### assetList() - -> **assetList**(`filter`?): [`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -Defined in: [src/Reports/index.ts:73](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L73) - -##### Parameters - -###### filter? - -[`AssetListReportFilter`](#type-assetlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetListReport`](#type-assetlistreport)[]\> - -*** - -#### assetTransactions() - -> **assetTransactions**(`filter`?): [`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -Defined in: [src/Reports/index.ts:61](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L61) - -##### Parameters - -###### filter? - -[`AssetTransactionReportFilter`](#type-assettransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`AssetTransactionReport`](#type-assettransactionreport)[]\> - -*** - -#### balanceSheet() - -> **balanceSheet**(`filter`?): [`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -Defined in: [src/Reports/index.ts:45](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L45) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`BalanceSheetReport`](#type-balancesheetreport)[]\> - -*** - -#### cashflow() - -> **cashflow**(`filter`?): [`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -Defined in: [src/Reports/index.ts:49](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L49) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`CashflowReport`](#type-cashflowreport)[]\> - -*** - -#### feeTransactions() - -> **feeTransactions**(`filter`?): [`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -Defined in: [src/Reports/index.ts:69](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L69) - -##### Parameters - -###### filter? - -[`FeeTransactionReportFilter`](#type-feetransactionreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`FeeTransactionReport`](#type-feetransactionreport)[]\> - -*** - -#### investorList() - -> **investorList**(`filter`?): [`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -Defined in: [src/Reports/index.ts:77](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L77) - -##### Parameters - -###### filter? - -[`InvestorListReportFilter`](#type-investorlistreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorListReport`](#type-investorlistreport)[]\> - -*** - -#### investorTransactions() - -> **investorTransactions**(`filter`?): [`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -Defined in: [src/Reports/index.ts:57](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L57) - -##### Parameters - -###### filter? - -[`InvestorTransactionsReportFilter`](#type-investortransactionsreportfilter) - -##### Returns - -[`Query`](#type-query)\<[`InvestorTransactionsReport`](#type-investortransactionsreport)[]\> - -*** - -#### profitAndLoss() - -> **profitAndLoss**(`filter`?): [`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -Defined in: [src/Reports/index.ts:53](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L53) - -##### Parameters - -###### filter? - -[`ReportFilter`](#type-reportfilter) - -##### Returns - -[`Query`](#type-query)\<[`ProfitAndLossReport`](#type-profitandlossreport)[]\> - -*** - -#### tokenPrice() - -> **tokenPrice**(`filter`?): [`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> - -Defined in: [src/Reports/index.ts:65](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Reports/index.ts#L65) - -##### Parameters - -###### filter? - -[`TokenPriceReportFilter`](#type-tokenpricereportfilter) - -##### Returns - -[`Query`](#type-query)\<[`TokenPriceReport`](#type-tokenpricereport)[]\> diff --git a/docs/classes/_Vault.md b/docs/classes/_Vault.md deleted file mode 100644 index 5abd0a9..0000000 --- a/docs/classes/_Vault.md +++ /dev/null @@ -1,227 +0,0 @@ - -## Class: Vault - -Defined in: [src/Vault.ts:19](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L19) - -Query and interact with a vault, which is the main entry point for investing and redeeming funds. -A vault is the combination of a network, a pool, a tranche and an investment currency. - -### Extends - -- `Entity` - -### Properties - -#### address - -> **address**: `` `0x${string}` `` - -Defined in: [src/Vault.ts:30](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L30) - -The contract address of the vault. - -*** - -#### chainId - -> **chainId**: `number` - -Defined in: [src/Vault.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L21) - -*** - -#### network - -> **network**: [`PoolNetwork`](#class-poolnetwork) - -Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L34) - -*** - -#### pool - -> **pool**: [`Pool`](#class-pool) - -Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L20) - -*** - -#### trancheId - -> **trancheId**: `string` - -Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L35) - -### Methods - -#### allowance() - -> **allowance**(`owner`): [`Query`](#type-query)\<[`Currency`](#class-currency)\> - -Defined in: [src/Vault.ts:84](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L84) - -Get the allowance of the investment currency for the CentrifugeRouter, -which is the contract that moves funds into the vault on behalf of the investor. - -##### Parameters - -###### owner - -`string` - -The address of the owner - -##### Returns - -[`Query`](#type-query)\<[`Currency`](#class-currency)\> - -*** - -#### cancelInvestOrder() - -> **cancelInvestOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:320](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L320) - -Cancel an open investment order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### cancelRedeemOrder() - -> **cancelRedeemOrder**(): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:369](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L369) - -Cancel an open redemption order. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### claim() - -> **claim**(`receiver`?, `controller`?): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:395](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L395) - -Claim any outstanding fund shares after an investment has gone through, or funds after an redemption has gone through. - -##### Parameters - -###### receiver? - -`string` - -The address that should receive the funds. If not provided, the investor's address is used. - -###### controller? - -`string` - -The address of the user that has invested. Allows someone else to claim on behalf of the user - if the user has set the CentrifugeRouter as an operator on the vault. If not provided, the investor's address is used. - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseInvestOrder() - -> **increaseInvestOrder**(`investAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:239](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L239) - -Place an order to invest funds in the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### investAmount - -`NumberInput` - -The amount to invest in the vault - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### increaseRedeemOrder() - -> **increaseRedeemOrder**(`redeemAmount`): [`Transaction`](#type-transaction) - -Defined in: [src/Vault.ts:344](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L344) - -Place an order to redeem funds from the vault. If an order exists, it will increase the amount. - -##### Parameters - -###### redeemAmount - -`NumberInput` - -The amount of shares to redeem - -##### Returns - -[`Transaction`](#type-transaction) - -*** - -#### investment() - -> **investment**(`investor`): [`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -Defined in: [src/Vault.ts:128](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L128) - -Get the details of the investment of an investor in the vault and any pending investments or redemptions. - -##### Parameters - -###### investor - -`string` - -The address of the investor - -##### Returns - -[`Query`](#type-query)\<\{ `claimableCancelInvestCurrency`: [`Currency`](#class-currency); `claimableCancelRedeemShares`: `Token`; `claimableInvestCurrencyEquivalent`: [`Currency`](#class-currency); `claimableInvestShares`: `Token`; `claimableRedeemCurrency`: [`Currency`](#class-currency); `claimableRedeemSharesEquivalent`: `Token`; `hasPendingCancelInvestRequest`: `boolean`; `hasPendingCancelRedeemRequest`: `boolean`; `investmentCurrency`: [`CurrencyMetadata`](#type-currencymetadata); `investmentCurrencyAllowance`: [`Currency`](#class-currency); `investmentCurrencyBalance`: [`Currency`](#class-currency); `isAllowedToInvest`: `boolean`; `pendingInvestCurrency`: [`Currency`](#class-currency); `pendingRedeemShares`: `Token`; `shareBalance`: `Token`; `shareCurrency`: [`CurrencyMetadata`](#type-currencymetadata); \}\> - -*** - -#### investmentCurrency() - -> **investmentCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:68](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L68) - -Get the details of the investment currency. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -*** - -#### shareCurrency() - -> **shareCurrency**(): [`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> - -Defined in: [src/Vault.ts:75](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/Vault.ts#L75) - -Get the details of the share token. - -##### Returns - -[`Query`](#type-query)\<[`CurrencyMetadata`](#type-currencymetadata)\> diff --git a/docs/type-aliases/_AssetListReport.md b/docs/type-aliases/_AssetListReport.md deleted file mode 100644 index e8e3daf..0000000 --- a/docs/type-aliases/_AssetListReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: AssetListReport - -> **AssetListReport**: [`AssetListReportBase`](#type-assetlistreportbase) & [`AssetListReportPublicCredit`](#type-assetlistreportpubliccredit) \| [`AssetListReportPrivateCredit`](#type-assetlistreportprivatecredit) - -Defined in: [src/types/reports.ts:265](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L265) diff --git a/docs/type-aliases/_AssetListReportBase.md b/docs/type-aliases/_AssetListReportBase.md deleted file mode 100644 index a607ae6..0000000 --- a/docs/type-aliases/_AssetListReportBase.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetListReportBase - -> **AssetListReportBase**: `object` - -Defined in: [src/types/reports.ts:231](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L231) - -### Type declaration - -#### assetId - -> **assetId**: `string` - -#### presentValue - -> **presentValue**: [`Currency`](#class-currency) \| `undefined` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"assetList"` diff --git a/docs/type-aliases/_AssetListReportFilter.md b/docs/type-aliases/_AssetListReportFilter.md deleted file mode 100644 index e81702e..0000000 --- a/docs/type-aliases/_AssetListReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: AssetListReportFilter - -> **AssetListReportFilter**: `object` - -Defined in: [src/types/reports.ts:267](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L267) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### status? - -> `optional` **status**: `"ongoing"` \| `"repaid"` \| `"overdue"` \| `"all"` - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_AssetListReportPrivateCredit.md b/docs/type-aliases/_AssetListReportPrivateCredit.md deleted file mode 100644 index b651d62..0000000 --- a/docs/type-aliases/_AssetListReportPrivateCredit.md +++ /dev/null @@ -1,64 +0,0 @@ - -## Type: AssetListReportPrivateCredit - -> **AssetListReportPrivateCredit**: `object` - -Defined in: [src/types/reports.ts:248](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L248) - -### Type declaration - -#### advanceRate - -> **advanceRate**: [`Rate`](#class-rate) \| `undefined` - -#### collateralValue - -> **collateralValue**: [`Currency`](#class-currency) \| `undefined` - -#### discountRate - -> **discountRate**: [`Rate`](#class-rate) \| `undefined` - -#### lossGivenDefault - -> **lossGivenDefault**: [`Rate`](#class-rate) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### originationDate - -> **originationDate**: `number` \| `undefined` - -#### outstandingInterest - -> **outstandingInterest**: [`Currency`](#class-currency) \| `undefined` - -#### outstandingPrincipal - -> **outstandingPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### probabilityOfDefault - -> **probabilityOfDefault**: [`Rate`](#class-rate) \| `undefined` - -#### repaidInterest - -> **repaidInterest**: [`Currency`](#class-currency) \| `undefined` - -#### repaidPrincipal - -> **repaidPrincipal**: [`Currency`](#class-currency) \| `undefined` - -#### repaidUnscheduled - -> **repaidUnscheduled**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"privateCredit"` - -#### valuationMethod - -> **valuationMethod**: `string` \| `undefined` diff --git a/docs/type-aliases/_AssetListReportPublicCredit.md b/docs/type-aliases/_AssetListReportPublicCredit.md deleted file mode 100644 index 32ab0bd..0000000 --- a/docs/type-aliases/_AssetListReportPublicCredit.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetListReportPublicCredit - -> **AssetListReportPublicCredit**: `object` - -Defined in: [src/types/reports.ts:238](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L238) - -### Type declaration - -#### currentPrice - -> **currentPrice**: [`Price`](#class-price) \| `undefined` - -#### faceValue - -> **faceValue**: [`Currency`](#class-currency) \| `undefined` - -#### maturityDate - -> **maturityDate**: `string` \| `undefined` - -#### outstandingQuantity - -> **outstandingQuantity**: [`Currency`](#class-currency) \| `undefined` - -#### realizedProfit - -> **realizedProfit**: [`Currency`](#class-currency) \| `undefined` - -#### subtype - -> **subtype**: `"publicCredit"` - -#### unrealizedProfit - -> **unrealizedProfit**: [`Currency`](#class-currency) \| `undefined` diff --git a/docs/type-aliases/_AssetTransactionReport.md b/docs/type-aliases/_AssetTransactionReport.md deleted file mode 100644 index 9b9f4cc..0000000 --- a/docs/type-aliases/_AssetTransactionReport.md +++ /dev/null @@ -1,36 +0,0 @@ - -## Type: AssetTransactionReport - -> **AssetTransactionReport**: `object` - -Defined in: [src/types/reports.ts:167](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L167) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### assetId - -> **assetId**: `string` - -#### epoch - -> **epoch**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `AssetTransactionType` - -#### type - -> **type**: `"assetTransactions"` diff --git a/docs/type-aliases/_AssetTransactionReportFilter.md b/docs/type-aliases/_AssetTransactionReportFilter.md deleted file mode 100644 index 7e42f61..0000000 --- a/docs/type-aliases/_AssetTransactionReportFilter.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: AssetTransactionReportFilter - -> **AssetTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:177](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L177) - -### Type declaration - -#### assetId? - -> `optional` **assetId**: `string` - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"created"` \| `"financed"` \| `"repaid"` \| `"priced"` \| `"closed"` \| `"cashTransfer"` \| `"all"` diff --git a/docs/type-aliases/_BalanceSheetReport.md b/docs/type-aliases/_BalanceSheetReport.md deleted file mode 100644 index 23548b1..0000000 --- a/docs/type-aliases/_BalanceSheetReport.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Type: BalanceSheetReport - -> **BalanceSheetReport**: `object` - -Defined in: [src/types/reports.ts:36](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L36) - -Balance sheet type - -### Type declaration - -#### accruedFees - -> **accruedFees**: [`Currency`](#class-currency) - -#### assetValuation - -> **assetValuation**: [`Currency`](#class-currency) - -#### netAssetValue - -> **netAssetValue**: [`Currency`](#class-currency) - -#### offchainCash - -> **offchainCash**: [`Currency`](#class-currency) - -#### onchainReserve - -> **onchainReserve**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCapital? - -> `optional` **totalCapital**: [`Currency`](#class-currency) - -#### tranches? - -> `optional` **tranches**: `object`[] - -#### type - -> **type**: `"balanceSheet"` diff --git a/docs/type-aliases/_CashflowReport.md b/docs/type-aliases/_CashflowReport.md deleted file mode 100644 index a68ddf6..0000000 --- a/docs/type-aliases/_CashflowReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: CashflowReport - -> **CashflowReport**: [`CashflowReportPublicCredit`](#type-cashflowreportpubliccredit) \| [`CashflowReportPrivateCredit`](#type-cashflowreportprivatecredit) - -Defined in: [src/types/reports.ts:89](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L89) diff --git a/docs/type-aliases/_CashflowReportBase.md b/docs/type-aliases/_CashflowReportBase.md deleted file mode 100644 index a88d5a7..0000000 --- a/docs/type-aliases/_CashflowReportBase.md +++ /dev/null @@ -1,62 +0,0 @@ - -## Type: CashflowReportBase - -> **CashflowReportBase**: `object` - -Defined in: [src/types/reports.ts:63](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L63) - -Cashflow types - -### Type declaration - -#### activitiesCashflow - -> **activitiesCashflow**: [`Currency`](#class-currency) - -#### endCashBalance - -> **endCashBalance**: `object` - -##### endCashBalance.balance - -> **balance**: [`Currency`](#class-currency) - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### investments - -> **investments**: [`Currency`](#class-currency) - -#### netCashflowAfterFees - -> **netCashflowAfterFees**: [`Currency`](#class-currency) - -#### netCashflowAsset - -> **netCashflowAsset**: [`Currency`](#class-currency) - -#### principalPayments - -> **principalPayments**: [`Currency`](#class-currency) - -#### redemptions - -> **redemptions**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalCashflow - -> **totalCashflow**: [`Currency`](#class-currency) - -#### type - -> **type**: `"cashflow"` diff --git a/docs/type-aliases/_CashflowReportPrivateCredit.md b/docs/type-aliases/_CashflowReportPrivateCredit.md deleted file mode 100644 index 9be53e7..0000000 --- a/docs/type-aliases/_CashflowReportPrivateCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: CashflowReportPrivateCredit - -> **CashflowReportPrivateCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:84](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L84) - -### Type declaration - -#### assetFinancing? - -> `optional` **assetFinancing**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_CashflowReportPublicCredit.md b/docs/type-aliases/_CashflowReportPublicCredit.md deleted file mode 100644 index 30e6bc2..0000000 --- a/docs/type-aliases/_CashflowReportPublicCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: CashflowReportPublicCredit - -> **CashflowReportPublicCredit**: [`CashflowReportBase`](#type-cashflowreportbase) & `object` - -Defined in: [src/types/reports.ts:78](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L78) - -### Type declaration - -#### assetPurchases? - -> `optional` **assetPurchases**: [`Currency`](#class-currency) - -#### realizedPL? - -> `optional` **realizedPL**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"publicCredit"` diff --git a/docs/type-aliases/_Client.md b/docs/type-aliases/_Client.md deleted file mode 100644 index c6657c6..0000000 --- a/docs/type-aliases/_Client.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Client - -> **Client**: `PublicClient`\<`any`, `Chain`\> - -Defined in: [src/types/index.ts:19](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/index.ts#L19) diff --git a/docs/type-aliases/_Config.md b/docs/type-aliases/_Config.md deleted file mode 100644 index cca27b6..0000000 --- a/docs/type-aliases/_Config.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: Config - -> **Config**: `object` - -Defined in: [src/types/index.ts:3](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/index.ts#L3) - -### Type declaration - -#### environment - -> **environment**: `"mainnet"` \| `"demo"` \| `"dev"` - -#### indexerUrl - -> **indexerUrl**: `string` - -#### ipfsUrl - -> **ipfsUrl**: `string` - -#### rpcUrls? - -> `optional` **rpcUrls**: `Record`\<`number` \| `string`, `string`\> diff --git a/docs/type-aliases/_CurrencyMetadata.md b/docs/type-aliases/_CurrencyMetadata.md deleted file mode 100644 index 84bf5fa..0000000 --- a/docs/type-aliases/_CurrencyMetadata.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: CurrencyMetadata - -> **CurrencyMetadata**: `object` - -Defined in: [src/config/lp.ts:43](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/config/lp.ts#L43) - -### Type declaration - -#### address - -> **address**: [`HexString`](#type-hexstring) - -#### chainId - -> **chainId**: `number` - -#### decimals - -> **decimals**: `number` - -#### name - -> **name**: `string` - -#### supportsPermit - -> **supportsPermit**: `boolean` - -#### symbol - -> **symbol**: `string` diff --git a/docs/type-aliases/_EIP1193ProviderLike.md b/docs/type-aliases/_EIP1193ProviderLike.md deleted file mode 100644 index 59d222b..0000000 --- a/docs/type-aliases/_EIP1193ProviderLike.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: EIP1193ProviderLike - -> **EIP1193ProviderLike**: `object` - -Defined in: [src/types/transaction.ts:50](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L50) - -### Type declaration - -#### request() - -##### Parameters - -###### args - -...`any` - -##### Returns - -`Promise`\<`any`\> diff --git a/docs/type-aliases/_FeeTransactionReport.md b/docs/type-aliases/_FeeTransactionReport.md deleted file mode 100644 index 6dd4fe4..0000000 --- a/docs/type-aliases/_FeeTransactionReport.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: FeeTransactionReport - -> **FeeTransactionReport**: `object` - -Defined in: [src/types/reports.ts:191](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L191) - -### Type declaration - -#### amount - -> **amount**: [`Currency`](#class-currency) - -#### feeId - -> **feeId**: `string` - -#### timestamp - -> **timestamp**: `string` - -#### type - -> **type**: `"feeTransactions"` diff --git a/docs/type-aliases/_FeeTransactionReportFilter.md b/docs/type-aliases/_FeeTransactionReportFilter.md deleted file mode 100644 index 0f5774c..0000000 --- a/docs/type-aliases/_FeeTransactionReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: FeeTransactionReportFilter - -> **FeeTransactionReportFilter**: `object` - -Defined in: [src/types/reports.ts:198](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L198) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### to? - -> `optional` **to**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"directChargeMade"` \| `"directChargeCanceled"` \| `"accrued"` \| `"paid"` \| `"all"` diff --git a/docs/type-aliases/_GroupBy.md b/docs/type-aliases/_GroupBy.md deleted file mode 100644 index 1547fd0..0000000 --- a/docs/type-aliases/_GroupBy.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: GroupBy - -> **GroupBy**: `"day"` \| `"month"` \| `"quarter"` \| `"year"` - -Defined in: [src/utils/date.ts:5](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/utils/date.ts#L5) diff --git a/docs/type-aliases/_HexString.md b/docs/type-aliases/_HexString.md deleted file mode 100644 index 758a20a..0000000 --- a/docs/type-aliases/_HexString.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: HexString - -> **HexString**: `` `0x${string}` `` - -Defined in: [src/types/index.ts:20](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/index.ts#L20) diff --git a/docs/type-aliases/_InvestorListReport.md b/docs/type-aliases/_InvestorListReport.md deleted file mode 100644 index 68f3e89..0000000 --- a/docs/type-aliases/_InvestorListReport.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Type: InvestorListReport - -> **InvestorListReport**: `object` - -Defined in: [src/types/reports.ts:279](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L279) - -### Type declaration - -#### accountId - -> **accountId**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` \| `"all"` - -#### evmAddress? - -> `optional` **evmAddress**: `string` - -#### pendingInvest - -> **pendingInvest**: [`Currency`](#class-currency) - -#### pendingRedeem - -> **pendingRedeem**: [`Currency`](#class-currency) - -#### poolPercentage - -> **poolPercentage**: [`Rate`](#class-rate) - -#### position - -> **position**: [`Currency`](#class-currency) - -#### type - -> **type**: `"investorList"` diff --git a/docs/type-aliases/_InvestorListReportFilter.md b/docs/type-aliases/_InvestorListReportFilter.md deleted file mode 100644 index 85728a9..0000000 --- a/docs/type-aliases/_InvestorListReportFilter.md +++ /dev/null @@ -1,28 +0,0 @@ - -## Type: InvestorListReportFilter - -> **InvestorListReportFilter**: `object` - -Defined in: [src/types/reports.ts:290](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L290) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### trancheId? - -> `optional` **trancheId**: `string` diff --git a/docs/type-aliases/_InvestorTransactionsReport.md b/docs/type-aliases/_InvestorTransactionsReport.md deleted file mode 100644 index f8c65c6..0000000 --- a/docs/type-aliases/_InvestorTransactionsReport.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Type: InvestorTransactionsReport - -> **InvestorTransactionsReport**: `object` - -Defined in: [src/types/reports.ts:137](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L137) - -### Type declaration - -#### account - -> **account**: `string` - -#### chainId - -> **chainId**: `number` \| `"centrifuge"` - -#### currencyAmount - -> **currencyAmount**: [`Currency`](#class-currency) - -#### epoch - -> **epoch**: `string` - -#### price - -> **price**: [`Price`](#class-price) - -#### timestamp - -> **timestamp**: `string` - -#### trancheTokenAmount - -> **trancheTokenAmount**: [`Currency`](#class-currency) - -#### trancheTokenId - -> **trancheTokenId**: `string` - -#### transactionHash - -> **transactionHash**: `string` - -#### transactionType - -> **transactionType**: `SubqueryInvestorTransactionType` - -#### type - -> **type**: `"investorTransactions"` diff --git a/docs/type-aliases/_InvestorTransactionsReportFilter.md b/docs/type-aliases/_InvestorTransactionsReportFilter.md deleted file mode 100644 index a016600..0000000 --- a/docs/type-aliases/_InvestorTransactionsReportFilter.md +++ /dev/null @@ -1,32 +0,0 @@ - -## Type: InvestorTransactionsReportFilter - -> **InvestorTransactionsReportFilter**: `object` - -Defined in: [src/types/reports.ts:151](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L151) - -### Type declaration - -#### address? - -> `optional` **address**: `string` - -#### from? - -> `optional` **from**: `string` - -#### network? - -> `optional` **network**: `number` \| `"centrifuge"` \| `"all"` - -#### to? - -> `optional` **to**: `string` - -#### tokenId? - -> `optional` **tokenId**: `string` - -#### transactionType? - -> `optional` **transactionType**: `"orders"` \| `"executions"` \| `"transfers"` \| `"all"` diff --git a/docs/type-aliases/_OperationConfirmedStatus.md b/docs/type-aliases/_OperationConfirmedStatus.md deleted file mode 100644 index 0614a64..0000000 --- a/docs/type-aliases/_OperationConfirmedStatus.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Type: OperationConfirmedStatus - -> **OperationConfirmedStatus**: `object` - -Defined in: [src/types/transaction.ts:31](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L31) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### receipt - -> **receipt**: `TransactionReceipt` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionConfirmed"` diff --git a/docs/type-aliases/_OperationPendingStatus.md b/docs/type-aliases/_OperationPendingStatus.md deleted file mode 100644 index a23d035..0000000 --- a/docs/type-aliases/_OperationPendingStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationPendingStatus - -> **OperationPendingStatus**: `object` - -Defined in: [src/types/transaction.ts:26](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L26) - -### Type declaration - -#### hash - -> **hash**: [`HexString`](#type-hexstring) - -#### title - -> **title**: `string` - -#### type - -> **type**: `"TransactionPending"` diff --git a/docs/type-aliases/_OperationSignedMessageStatus.md b/docs/type-aliases/_OperationSignedMessageStatus.md deleted file mode 100644 index f222c05..0000000 --- a/docs/type-aliases/_OperationSignedMessageStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: OperationSignedMessageStatus - -> **OperationSignedMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:21](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L21) - -### Type declaration - -#### signed - -> **signed**: `any` - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SignedMessage"` diff --git a/docs/type-aliases/_OperationSigningMessageStatus.md b/docs/type-aliases/_OperationSigningMessageStatus.md deleted file mode 100644 index 535c106..0000000 --- a/docs/type-aliases/_OperationSigningMessageStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningMessageStatus - -> **OperationSigningMessageStatus**: `object` - -Defined in: [src/types/transaction.ts:17](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L17) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningMessage"` diff --git a/docs/type-aliases/_OperationSigningStatus.md b/docs/type-aliases/_OperationSigningStatus.md deleted file mode 100644 index fc2672e..0000000 --- a/docs/type-aliases/_OperationSigningStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSigningStatus - -> **OperationSigningStatus**: `object` - -Defined in: [src/types/transaction.ts:13](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L13) - -### Type declaration - -#### title - -> **title**: `string` - -#### type - -> **type**: `"SigningTransaction"` diff --git a/docs/type-aliases/_OperationStatus.md b/docs/type-aliases/_OperationStatus.md deleted file mode 100644 index 995775f..0000000 --- a/docs/type-aliases/_OperationStatus.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatus - -> **OperationStatus**: [`OperationSigningStatus`](#type-operationsigningstatus) \| [`OperationSigningMessageStatus`](#type-operationsigningmessagestatus) \| [`OperationSignedMessageStatus`](#type-operationsignedmessagestatus) \| [`OperationPendingStatus`](#type-operationpendingstatus) \| [`OperationConfirmedStatus`](#type-operationconfirmedstatus) \| [`OperationSwitchChainStatus`](#type-operationswitchchainstatus) - -Defined in: [src/types/transaction.ts:42](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L42) diff --git a/docs/type-aliases/_OperationStatusType.md b/docs/type-aliases/_OperationStatusType.md deleted file mode 100644 index b99af62..0000000 --- a/docs/type-aliases/_OperationStatusType.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: OperationStatusType - -> **OperationStatusType**: `"SwitchingChain"` \| `"SigningTransaction"` \| `"SigningMessage"` \| `"SignedMessage"` \| `"TransactionPending"` \| `"TransactionConfirmed"` - -Defined in: [src/types/transaction.ts:5](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L5) diff --git a/docs/type-aliases/_OperationSwitchChainStatus.md b/docs/type-aliases/_OperationSwitchChainStatus.md deleted file mode 100644 index 40abc11..0000000 --- a/docs/type-aliases/_OperationSwitchChainStatus.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: OperationSwitchChainStatus - -> **OperationSwitchChainStatus**: `object` - -Defined in: [src/types/transaction.ts:37](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L37) - -### Type declaration - -#### chainId - -> **chainId**: `number` - -#### type - -> **type**: `"SwitchingChain"` diff --git a/docs/type-aliases/_ProfitAndLossReport.md b/docs/type-aliases/_ProfitAndLossReport.md deleted file mode 100644 index dc64020..0000000 --- a/docs/type-aliases/_ProfitAndLossReport.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: ProfitAndLossReport - -> **ProfitAndLossReport**: [`ProfitAndLossReportPublicCredit`](#type-profitandlossreportpubliccredit) \| [`ProfitAndLossReportPrivateCredit`](#type-profitandlossreportprivatecredit) - -Defined in: [src/types/reports.ts:122](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L122) diff --git a/docs/type-aliases/_ProfitAndLossReportBase.md b/docs/type-aliases/_ProfitAndLossReportBase.md deleted file mode 100644 index 991fc5f..0000000 --- a/docs/type-aliases/_ProfitAndLossReportBase.md +++ /dev/null @@ -1,42 +0,0 @@ - -## Type: ProfitAndLossReportBase - -> **ProfitAndLossReportBase**: `object` - -Defined in: [src/types/reports.ts:100](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L100) - -Profit and loss types - -### Type declaration - -#### fees - -> **fees**: `object`[] - -#### interestPayments - -> **interestPayments**: [`Currency`](#class-currency) - -#### otherPayments - -> **otherPayments**: [`Currency`](#class-currency) - -#### profitAndLossFromAsset - -> **profitAndLossFromAsset**: [`Currency`](#class-currency) - -#### timestamp - -> **timestamp**: `string` - -#### totalExpenses - -> **totalExpenses**: [`Currency`](#class-currency) - -#### totalProfitAndLoss - -> **totalProfitAndLoss**: [`Currency`](#class-currency) - -#### type - -> **type**: `"profitAndLoss"` diff --git a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md b/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md deleted file mode 100644 index b352a1f..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPrivateCredit.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ProfitAndLossReportPrivateCredit - -> **ProfitAndLossReportPrivateCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:116](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L116) - -### Type declaration - -#### assetWriteOffs - -> **assetWriteOffs**: [`Currency`](#class-currency) - -#### interestAccrued - -> **interestAccrued**: [`Currency`](#class-currency) - -#### subtype - -> **subtype**: `"privateCredit"` diff --git a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md b/docs/type-aliases/_ProfitAndLossReportPublicCredit.md deleted file mode 100644 index 927a3e5..0000000 --- a/docs/type-aliases/_ProfitAndLossReportPublicCredit.md +++ /dev/null @@ -1,16 +0,0 @@ - -## Type: ProfitAndLossReportPublicCredit - -> **ProfitAndLossReportPublicCredit**: [`ProfitAndLossReportBase`](#type-profitandlossreportbase) & `object` - -Defined in: [src/types/reports.ts:111](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L111) - -### Type declaration - -#### subtype - -> **subtype**: `"publicCredit"` - -#### totalIncome - -> **totalIncome**: [`Currency`](#class-currency) diff --git a/docs/type-aliases/_Query.md b/docs/type-aliases/_Query.md deleted file mode 100644 index 0ebba47..0000000 --- a/docs/type-aliases/_Query.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: Query - -> **Query**\<`T`\>: `PromiseLike`\<`T`\> & `Observable`\<`T`\> & `object` - -Defined in: [src/types/query.ts:15](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/query.ts#L15) - -### Type declaration - -#### toPromise() - -> **toPromise**: () => `Promise`\<`T`\> - -##### Returns - -`Promise`\<`T`\> - -### Type Parameters - -• **T** diff --git a/docs/type-aliases/_ReportFilter.md b/docs/type-aliases/_ReportFilter.md deleted file mode 100644 index bd737c3..0000000 --- a/docs/type-aliases/_ReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: ReportFilter - -> **ReportFilter**: `object` - -Defined in: [src/types/reports.ts:13](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L13) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Signer.md b/docs/type-aliases/_Signer.md deleted file mode 100644 index f82bbce..0000000 --- a/docs/type-aliases/_Signer.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Signer - -> **Signer**: [`EIP1193ProviderLike`](#type-eip1193providerlike) \| `LocalAccount` - -Defined in: [src/types/transaction.ts:53](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L53) diff --git a/docs/type-aliases/_TokenPriceReport.md b/docs/type-aliases/_TokenPriceReport.md deleted file mode 100644 index 1977448..0000000 --- a/docs/type-aliases/_TokenPriceReport.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReport - -> **TokenPriceReport**: `object` - -Defined in: [src/types/reports.ts:211](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L211) - -### Type declaration - -#### timestamp - -> **timestamp**: `string` - -#### tranches - -> **tranches**: `object`[] - -#### type - -> **type**: `"tokenPrice"` diff --git a/docs/type-aliases/_TokenPriceReportFilter.md b/docs/type-aliases/_TokenPriceReportFilter.md deleted file mode 100644 index 10484fa..0000000 --- a/docs/type-aliases/_TokenPriceReportFilter.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Type: TokenPriceReportFilter - -> **TokenPriceReportFilter**: `object` - -Defined in: [src/types/reports.ts:217](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/reports.ts#L217) - -### Type declaration - -#### from? - -> `optional` **from**: `string` - -#### groupBy? - -> `optional` **groupBy**: [`GroupBy`](#type-groupby) - -#### to? - -> `optional` **to**: `string` diff --git a/docs/type-aliases/_Transaction.md b/docs/type-aliases/_Transaction.md deleted file mode 100644 index d2fa5a6..0000000 --- a/docs/type-aliases/_Transaction.md +++ /dev/null @@ -1,6 +0,0 @@ - -## Type: Transaction - -> **Transaction**: [`Query`](#type-query)\<[`OperationStatus`](#type-operationstatus)\> - -Defined in: [src/types/transaction.ts:64](https://github.com/centrifuge/sdk/blob/e8e313ed95c35b522a7e87515220a81ae2649430/src/types/transaction.ts#L64) From 89e29cfd91c249c6d0dc7754dc9ba4bee482214a Mon Sep 17 00:00:00 2001 From: sophian Date: Wed, 15 Jan 2025 16:40:14 -0500 Subject: [PATCH 42/42] Move diff check into script --- .github/ci-scripts/update-sdk-docs.cjs | 36 ++++++++++++++++++-------- .github/workflows/update-docs.yml | 16 ------------ 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/.github/ci-scripts/update-sdk-docs.cjs b/.github/ci-scripts/update-sdk-docs.cjs index 74a675b..332013c 100644 --- a/.github/ci-scripts/update-sdk-docs.cjs +++ b/.github/ci-scripts/update-sdk-docs.cjs @@ -117,11 +117,6 @@ search: true await fs.writeFile(indexHtmlMdPath, updatedContent) - // Display results - console.log('\n📝 First 100 lines of updated file:') - console.log('----------------------------------------') - console.log(updatedContent.split('\n').slice(0, 100).join('\n')) - console.log('----------------------------------------') console.log(`✅ Total includes: ${allIncludes.length}`) } catch (error) { console.error('❌ Error updating index.html.md:', error) @@ -150,6 +145,20 @@ async function createPullRequest(git, branchName) { }) } +async function hasChanges(git) { + try { + await git.fetch('origin', 'main') + + // Get the diff between current state and main branch + const diff = await git.diff(['origin/main']) + + return diff.length > 0 + } catch (error) { + console.error('❌ Error checking for changes:', error) + throw error + } +} + async function main() { try { const git = simpleGit() @@ -164,13 +173,18 @@ async function main() { await copyDocs('./docs', './sdk-docs/source/includes') await updateIndexHtmlMd('./docs', './sdk-docs/source/index.html.md') - const branchName = `docs-update-${new Date().toISOString().slice(0, 19).replace(/[:-]/g, '').replace(' ', '-')}` - await git.checkoutLocalBranch(branchName) - await git.add('.').commit('Update SDK documentation') - await git.push('origin', branchName) + if (await hasChanges(git)) { + const branchName = `docs-update-${new Date().toISOString().slice(0, 19).replace(/[:-]/g, '').replace(' ', '-')}` + await git.checkoutLocalBranch(branchName) + await git.add('.').commit('Update SDK documentation') + await git.push('origin', branchName) - await createPullRequest(git, branchName) - console.log('✅ Successfully created PR with documentation updates') + await createPullRequest(git, branchName) + console.log('✅ Successfully created PR with documentation updates') + } else { + console.log('ℹ️ No documentation changes detected') + } + process.exit(0) } catch (error) { console.error('❌ Failed to process docs:', error) process.exit(1) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 5b4f869..72b80f9 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -30,30 +30,14 @@ jobs: - name: Run gen:docs command run: yarn gen:docs - - name: Check and commit changes - id: commit_check - run: | - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - if [[ -n "$(git status --porcelain docs)" ]]; then - git add docs - git commit -m "[ci:bot] Update docs" - echo "has_changes=true" >> "$GITHUB_OUTPUT" - else - echo "has_changes=false" >> "$GITHUB_OUTPUT" - fi - - name: Install dependencies - if: steps.commit_check.outputs.has_changes == 'true' run: yarn add simple-git - name: Setup GitHub CLI - if: steps.commit_check.outputs.has_changes == 'true' run: | gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}" - name: Update docs - if: steps.commit_check.outputs.has_changes == 'true' env: PAT_TOKEN: ${{ secrets.PAT_TOKEN }} run: node ./.github/ci-scripts/update-sdk-docs.cjs