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..6174593 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/src/Centrifuge.ts#L82) + +###### Returns + +`number`[] + +*** + +#### config + +##### Get Signature + +> **get** **config**(): `DerivedConfig` + +Defined in: [src/Centrifuge.ts:74](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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..f5945c0 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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..036dbba --- /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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/src/utils/BigInt.ts#L247) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/src/utils/BigInt.ts#L261) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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..6f7a246 --- /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/095efe08156a974db0fafe56584aa107b62503b4/src/Pool.ts#L8) + +### Extends + +- `Entity` + +### Properties + +#### id + +> **id**: `string` + +Defined in: [src/Pool.ts:12](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/src/Pool.ts#L12) + +*** + +#### metadataHash? + +> `optional` **metadataHash**: `string` + +Defined in: [src/Pool.ts:13](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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..44b47a0 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/src/PoolNetwork.ts#L21) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/PoolNetwork.ts:20](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/src/PoolNetwork.ts#L20) + +### Methods + +#### canTrancheBeDeployed() + +> **canTrancheBeDeployed**(`trancheId`): [`Query`](#type-query)\<`boolean`\> + +Defined in: [src/PoolNetwork.ts:269](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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..ef76c46 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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..538e239 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/src/utils/BigInt.ts#L178) + +### Methods + +#### ~~eq()~~ + +> **eq**\<`T`\>(`value`): `boolean` + +Defined in: [src/utils/BigInt.ts:115](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/src/utils/BigInt.ts#L202) + +##### Returns + +`Decimal` + +*** + +#### ~~toAprPercent()~~ + +> **toAprPercent**(): `Decimal` + +Defined in: [src/utils/BigInt.ts:210](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/src/utils/BigInt.ts#L210) + +##### Returns + +`Decimal` + +*** + +#### ~~toBigInt()~~ + +> **toBigInt**(): `bigint` + +Defined in: [src/utils/BigInt.ts:21](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/src/utils/BigInt.ts#L198) + +##### Returns + +`Decimal` + +*** + +#### ~~toString()~~ + +> **toString**(): `string` + +Defined in: [src/utils/BigInt.ts:17](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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..156125d --- /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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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..358134f --- /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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/src/Vault.ts#L21) + +*** + +#### network + +> **network**: [`PoolNetwork`](#class-poolnetwork) + +Defined in: [src/Vault.ts:34](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/src/Vault.ts#L34) + +*** + +#### pool + +> **pool**: [`Pool`](#class-pool) + +Defined in: [src/Vault.ts:20](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/src/Vault.ts#L20) + +*** + +#### trancheId + +> **trancheId**: `string` + +Defined in: [src/Vault.ts:35](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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/095efe08156a974db0fafe56584aa107b62503b4/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..a4ca80c --- /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/095efe08156a974db0fafe56584aa107b62503b4/src/types/reports.ts#L13) + +### Properties + +#### from? + +> `optional` **from**: `string` + +Defined in: [src/types/reports.ts:14](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/src/types/reports.ts#L14) + +*** + +#### groupBy? + +> `optional` **groupBy**: [`GroupBy`](#type-groupby) + +Defined in: [src/types/reports.ts:16](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/src/types/reports.ts#L16) + +*** + +#### to? + +> `optional` **to**: `string` + +Defined in: [src/types/reports.ts:15](https://github.com/centrifuge/sdk/blob/095efe08156a974db0fafe56584aa107b62503b4/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..748bef6 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..f1db4ca --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..f6c8bdf --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..f499c69 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..929ab37 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..53a3c01 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..778c0f6 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..fe3dae9 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..fce538b --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..cf35e8d --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..7655e32 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..627e147 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..90fd073 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..9daf68f --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..f6ac3bf --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..352d3e8 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..ec9f767 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..0c374b5 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..3fdc0fe --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..d8354f1 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..357f8c8 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..ee5f6d5 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..ad62ce8 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..d02be18 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..b7f7067 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..55db2a3 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..5f78cf4 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..62b9481 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..6030b06 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..5dd33a1 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..3388299 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..a9863f1 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..6cbdc10 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..70f823c --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..0acf708 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..db92171 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..8b3a120 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..b89c5b3 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..fadf51d --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..9054c28 --- /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/095efe08156a974db0fafe56584aa107b62503b4/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..04fbaaf --- /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/095efe08156a974db0fafe56584aa107b62503b4/src/types/transaction.ts#L64)