Skip to content

Commit

Permalink
feat: update docs in SDK & types (#1472)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurevans authored Jan 6, 2025
1 parent 942f67a commit dbcef4f
Show file tree
Hide file tree
Showing 49 changed files with 513 additions and 404 deletions.
14 changes: 7 additions & 7 deletions packages/sdk/docs/classes/Crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Class Crypto handles AES encryption tasks

#### Defined in

[sdk/src/crypto/crypto.ts:20](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/crypto/crypto.ts#L20)
[sdk/src/crypto/crypto.ts:20](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/crypto/crypto.ts#L20)

## Properties

Expand All @@ -52,7 +52,7 @@ WebAssembly Memory for crypto

#### Defined in

[sdk/src/crypto/crypto.ts:20](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/crypto/crypto.ts#L20)
[sdk/src/crypto/crypto.ts:20](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/crypto/crypto.ts#L20)

## Methods

Expand All @@ -75,7 +75,7 @@ decrypted text

#### Defined in

[sdk/src/crypto/crypto.ts:115](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/crypto/crypto.ts#L115)
[sdk/src/crypto/crypto.ts:115](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/crypto/crypto.ts#L115)

___

Expand All @@ -100,7 +100,7 @@ crypto record

#### Defined in

[sdk/src/crypto/crypto.ts:61](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/crypto/crypto.ts#L61)
[sdk/src/crypto/crypto.ts:61](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/crypto/crypto.ts#L61)

___

Expand All @@ -126,7 +126,7 @@ array of encrypted bytes

#### Defined in

[sdk/src/crypto/crypto.ts:98](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/crypto/crypto.ts#L98)
[sdk/src/crypto/crypto.ts:98](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/crypto/crypto.ts#L98)

___

Expand All @@ -153,7 +153,7 @@ crypto record used for storage

#### Defined in

[sdk/src/crypto/crypto.ts:30](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/crypto/crypto.ts#L30)
[sdk/src/crypto/crypto.ts:30](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/crypto/crypto.ts#L30)

___

Expand All @@ -178,4 +178,4 @@ encryption parameters

#### Defined in

[sdk/src/crypto/crypto.ts:73](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/crypto/crypto.ts#L73)
[sdk/src/crypto/crypto.ts:73](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/crypto/crypto.ts#L73)
49 changes: 10 additions & 39 deletions packages/sdk/docs/classes/Ledger.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Functionality for interacting with NamadaApp for Ledger Hardware Wallets
- [queryErrors](Ledger.md#queryerrors)
- [showAddressAndPublicKey](Ledger.md#showaddressandpublickey)
- [sign](Ledger.md#sign)
- [signMasp](Ledger.md#signmasp)
- [status](Ledger.md#status)
- [init](Ledger.md#init)

Expand All @@ -44,7 +43,7 @@ Functionality for interacting with NamadaApp for Ledger Hardware Wallets

#### Defined in

[sdk/src/ledger.ts:68](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L68)
[sdk/src/ledger.ts:68](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L68)

## Properties

Expand All @@ -56,7 +55,7 @@ Inititalized NamadaApp class from Zondax package

#### Defined in

[sdk/src/ledger.ts:68](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L68)
[sdk/src/ledger.ts:68](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L68)

## Methods

Expand All @@ -77,7 +76,7 @@ void

#### Defined in

[sdk/src/ledger.ts:245](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L245)
[sdk/src/ledger.ts:228](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L228)

___

Expand All @@ -104,7 +103,7 @@ Address and public key

#### Defined in

[sdk/src/ledger.ts:111](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L111)
[sdk/src/ledger.ts:111](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L111)

___

Expand Down Expand Up @@ -132,7 +131,7 @@ ShieldedKeys

#### Defined in

[sdk/src/ledger.ts:157](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L157)
[sdk/src/ledger.ts:157](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L157)

___

Expand All @@ -153,7 +152,7 @@ Error message if error is found

#### Defined in

[sdk/src/ledger.ts:228](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L228)
[sdk/src/ledger.ts:211](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L211)

___

Expand All @@ -180,7 +179,7 @@ Address and public key

#### Defined in

[sdk/src/ledger.ts:131](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L131)
[sdk/src/ledger.ts:131](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L131)

___

Expand Down Expand Up @@ -208,35 +207,7 @@ Response signature

#### Defined in

[sdk/src/ledger.ts:196](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L196)

___

### signMasp

**signMasp**(`tx`, `path?`): `Promise`\<`ResponseSign`\>

Sign a Masp tx with the shielded keys associated with the provided (or default) path.
Throw exception if app is not initialized.

#### Parameters

| Name | Type | Default value | Description |
| :------ | :------ | :------ | :------ |
| `tx` | `Uint8Array` | `undefined` | masp tx data blob to sign |
| `path?` | `string` | `DEFAULT_LEDGER_BIP44_PATH` | Bip44 path for signing account |

#### Returns

`Promise`\<`ResponseSign`\>

Response signature

**`Async`**

#### Defined in

[sdk/src/ledger.ts:213](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L213)
[sdk/src/ledger.ts:196](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L196)

___

Expand All @@ -257,7 +228,7 @@ Version and info of NamadaApp

#### Defined in

[sdk/src/ledger.ts:94](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L94)
[sdk/src/ledger.ts:94](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L94)

___

Expand All @@ -283,4 +254,4 @@ Ledger class instance

#### Defined in

[sdk/src/ledger.ts:76](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/ledger.ts#L76)
[sdk/src/ledger.ts:76](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/ledger.ts#L76)
46 changes: 36 additions & 10 deletions packages/sdk/docs/classes/Masp.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Class representing utilities related to MASP
- [addDefaultPaymentAddress](Masp.md#adddefaultpaymentaddress)
- [addSpendingKey](Masp.md#addspendingkey)
- [addViewingKey](Masp.md#addviewingkey)
- [clearShieldedContext](Masp.md#clearshieldedcontext)
- [fetchAndStoreMaspParams](Masp.md#fetchandstoremaspparams)
- [hasMaspParams](Masp.md#hasmaspparams)
- [loadMaspParams](Masp.md#loadmaspparams)
Expand All @@ -42,7 +43,7 @@ Class representing utilities related to MASP

#### Defined in

[sdk/src/masp.ts:10](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/masp.ts#L10)
[sdk/src/masp.ts:10](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L10)

## Properties

Expand All @@ -54,7 +55,7 @@ Instance of Sdk struct from wasm lib

#### Defined in

[sdk/src/masp.ts:10](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/masp.ts#L10)
[sdk/src/masp.ts:10](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L10)

## Methods

Expand All @@ -81,7 +82,7 @@ void

#### Defined in

[sdk/src/masp.ts:70](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/masp.ts#L70)
[sdk/src/masp.ts:71](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L71)

___

Expand All @@ -108,7 +109,7 @@ void

#### Defined in

[sdk/src/masp.ts:48](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/masp.ts#L48)
[sdk/src/masp.ts:49](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L49)

___

Expand All @@ -135,7 +136,31 @@ void

#### Defined in

[sdk/src/masp.ts:59](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/masp.ts#L59)
[sdk/src/masp.ts:60](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L60)

___

### clearShieldedContext

**clearShieldedContext**(`chainId`): `Promise`\<`void`\>

Clear shilded context

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `chainId` | `string` | Chain ID to clear the shielded context for |

#### Returns

`Promise`\<`void`\>

void

#### Defined in

[sdk/src/masp.ts:89](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L89)

___

Expand All @@ -161,7 +186,7 @@ void

#### Defined in

[sdk/src/masp.ts:27](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/masp.ts#L27)
[sdk/src/masp.ts:27](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L27)

___

Expand All @@ -181,13 +206,13 @@ True if MASP parameters are loaded

#### Defined in

[sdk/src/masp.ts:17](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/masp.ts#L17)
[sdk/src/masp.ts:17](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L17)

___

### loadMaspParams

**loadMaspParams**(`pathOrDbName`): `Promise`\<`void`\>
**loadMaspParams**(`pathOrDbName`, `chainId`): `Promise`\<`void`\>

Load stored MASP params

Expand All @@ -196,6 +221,7 @@ Load stored MASP params
| Name | Type | Description |
| :------ | :------ | :------ |
| `pathOrDbName` | `string` | Path to stored MASP params(nodejs) or name of the database(browser) |
| `chainId` | `string` | Chain ID to read the MASP params for |

#### Returns

Expand All @@ -207,7 +233,7 @@ void

#### Defined in

[sdk/src/masp.ts:37](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/masp.ts#L37)
[sdk/src/masp.ts:38](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L38)

___

Expand All @@ -226,4 +252,4 @@ the MASP address

#### Defined in

[sdk/src/masp.ts:79](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/masp.ts#L79)
[sdk/src/masp.ts:80](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/masp.ts#L80)
10 changes: 5 additions & 5 deletions packages/sdk/docs/classes/Mnemonic.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Class for accessing mnemonic functionality from wasm

#### Defined in

[sdk/src/mnemonic.ts:18](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/mnemonic.ts#L18)
[sdk/src/mnemonic.ts:18](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/mnemonic.ts#L18)

## Properties

Expand All @@ -50,7 +50,7 @@ Memory accessor for crypto lib

#### Defined in

[sdk/src/mnemonic.ts:18](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/mnemonic.ts#L18)
[sdk/src/mnemonic.ts:18](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/mnemonic.ts#L18)

## Methods

Expand All @@ -74,7 +74,7 @@ An array of words

#### Defined in

[sdk/src/mnemonic.ts:25](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/mnemonic.ts#L25)
[sdk/src/mnemonic.ts:25](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/mnemonic.ts#L25)

___

Expand All @@ -99,7 +99,7 @@ Seed bytes

#### Defined in

[sdk/src/mnemonic.ts:43](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/mnemonic.ts#L43)
[sdk/src/mnemonic.ts:43](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/mnemonic.ts#L43)

___

Expand Down Expand Up @@ -129,4 +129,4 @@ Object with validation result and error message if invalid

#### Defined in

[sdk/src/mnemonic.ts:61](https://github.com/anoma/namada-interface/blob/5bb72cf800fa4254312ea7fd624843feeaa5abf0/packages/sdk/src/mnemonic.ts#L61)
[sdk/src/mnemonic.ts:61](https://github.com/anoma/namada-interface/blob/9724dc7fb547e95a72df1eb06aecb9fed2c6a05b/packages/sdk/src/mnemonic.ts#L61)
8 changes: 4 additions & 4 deletions packages/sdk/docs/classes/ProgressBarNames.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#### Defined in

shared/src/shared/shared.d.ts:134
shared/src/shared/shared.d.ts:152

___

Expand All @@ -46,7 +46,7 @@ ___

#### Defined in

shared/src/shared/shared.d.ts:137
shared/src/shared/shared.d.ts:155

___

Expand All @@ -56,7 +56,7 @@ ___

#### Defined in

shared/src/shared/shared.d.ts:140
shared/src/shared/shared.d.ts:158

## Methods

Expand All @@ -70,4 +70,4 @@ shared/src/shared/shared.d.ts:140

#### Defined in

shared/src/shared/shared.d.ts:131
shared/src/shared/shared.d.ts:149
Loading

1 comment on commit dbcef4f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.