Skip to content

Commit 74ae847

Browse files
authored
docs: fix tsdoc syntax and recover dropped @PARAM field docs (#1650)
* docs: fix tsdoc syntax and recover dropped @PARAM field docs * fix: clean up tsdoc syntax, restore broken reference cross-links
1 parent a02b264 commit 74ae847

60 files changed

Lines changed: 1010 additions & 720 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/reference/contracts-client.md

Lines changed: 64 additions & 64 deletions
Large diffs are not rendered by default.

docs/reference/core-assets.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ constructor(code: string, issuer?: string);
5454

5555
Compares two assets according to the criteria:
5656

57-
1. First compare the type (native < alphanum4 < alphanum12).
57+
1. First compare the type (`native < alphanum4 < alphanum12`).
5858
2. If the types are equal, compare the assets codes.
5959
3. If the asset codes are equal, compare the issuers.
6060

@@ -126,7 +126,7 @@ contractId(networkPassphrase: string): string;
126126

127127
- **`networkPassphrase`**`string` (required) — indicates which network the contract
128128
ID should refer to, since every network will have a unique ID for the
129-
same contract (see `Networks` for options)
129+
same contract (see [`Networks`](/reference/core-transactions/#networks) for options)
130130

131131
**Source:** [src/base/asset.ts:172](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/asset.ts#L172)
132132

@@ -152,7 +152,7 @@ getAssetType(): AssetType;
152152

153153
**Throws**
154154

155-
- Throws `Error` if asset type is unsupported.
155+
- if asset type is unsupported.
156156

157157
**See also**
158158

@@ -455,8 +455,8 @@ constructor(assetA: Asset, assetB: Asset, fee: number);
455455

456456
**Parameters**
457457

458-
- **`assetA`**`Asset` (required) — The first asset in the Pool, it must respect the rule assetA < assetB. See `Asset.compare` for more details on how assets are sorted.
459-
- **`assetB`**`Asset` (required) — The second asset in the Pool, it must respect the rule assetA < assetB. See `Asset.compare` for more details on how assets are sorted.
458+
- **`assetA`**`Asset` (required) — The first asset in the Pool, it must respect the rule `assetA < assetB`. See [`Asset.compare`](#assetcompareasseta-assetb) for more details on how assets are sorted.
459+
- **`assetB`**`Asset` (required) — The second asset in the Pool, it must respect the rule `assetA < assetB`. See [`Asset.compare`](#assetcompareasseta-assetb) for more details on how assets are sorted.
460460
- **`fee`**`number` (required) — The liquidity pool fee. For now the only fee supported is `30`.
461461

462462
**Source:** [src/base/liquidity_pool_asset.ts:27](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/liquidity_pool_asset.ts#L27)
@@ -552,9 +552,9 @@ toString(): string;
552552

553553
Returns the `xdr.ChangeTrustAsset` object for this liquidity pool asset.
554554

555-
Note: To convert from an ``Asset`` to `xdr.ChangeTrustAsset`
555+
Note: To convert from an [``Asset``](#asset) to `xdr.ChangeTrustAsset`
556556
please refer to the
557-
``Asset.toChangeTrustXdrObject`` method.
557+
[``Asset.toChangeTrustXdrObject``](#assettochangetrustxdrobject) method.
558558

559559
```ts
560560
toXdrObject(): ChangeTrustAsset;
@@ -676,9 +676,9 @@ toString(): string;
676676

677677
Returns the `xdr.TrustLineAsset` object for this liquidity pool ID.
678678

679-
Note: To convert from ``Asset`` to `xdr.TrustLineAsset` please
679+
Note: To convert from [``Asset``](#asset) to `xdr.TrustLineAsset` please
680680
refer to the
681-
``Asset.toTrustLineXdrObject`` method.
681+
[``Asset.toTrustLineXdrObject``](#assettotrustlinexdrobject) method.
682682

683683
```ts
684684
toXdrObject(): TrustLineAsset;
@@ -701,6 +701,9 @@ getLiquidityPoolId(liquidityPoolType: "constant_product", liquidityPoolParameter
701701

702702
- **`liquidityPoolType`**`"constant_product"` (required) — A string representing the liquidity pool type.
703703
- **`liquidityPoolParameters`**`ConstantProduct` (required) — The liquidity pool parameters.
704+
- `assetA`: The first asset in the Pool, it must respect the rule `assetA < assetB`.
705+
- `assetB`: The second asset in the Pool, it must respect the rule `assetA < assetB`.
706+
- `fee`: The liquidity pool fee. For now the only fee supported is `30`.
704707

705708
**See also**
706709

docs/reference/core-keys.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ constructor(keys: { publicKey?: string | Uint8Array<ArrayBufferLike>; secretKey:
5555
**Parameters**
5656

5757
- **`keys`**`{ publicKey?: string | Uint8Array<ArrayBufferLike>; secretKey: string | Uint8Array<ArrayBufferLike>; type: "ed25519" } | { publicKey: string | Uint8Array<ArrayBufferLike>; type: "ed25519" }` (required) — at least one of keys must be provided.
58+
- `type`: public-key signature system name (currently only `ed25519` keys are supported)
59+
- `publicKey`: raw public key
60+
- `secretKey`: raw secret key (32-byte secret seed in ed25519)
5861

5962
**Source:** [src/base/keypair.ts:80](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/keypair.ts#L80)
6063

@@ -395,10 +398,10 @@ xdrPublicKey(): PublicKeyEd25519;
395398
## SignerKey
396399

397400
A container class with helpers to convert between signer keys
398-
(`xdr.SignerKey`) and `StrKey`s.
401+
(`xdr.SignerKey`) and [`StrKey`](#strkey)s.
399402

400403
It's primarily used for manipulating the `extraSigners` precondition on a
401-
`Transaction`.
404+
[`Transaction`](/reference/core-transactions/#transaction).
402405

403406
```ts
404407
class SignerKey {
@@ -410,7 +413,7 @@ class SignerKey {
410413

411414
**See also**
412415

413-
- `TransactionBuilder.setExtraSigners`
416+
- [`TransactionBuilder.setExtraSigners`](/reference/core-transactions/#transactionbuildersetextrasignersextrasigners)
414417

415418
**Source:** [src/base/signerkey.ts:22](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/signerkey.ts#L22)
416419

0 commit comments

Comments
 (0)