Skip to content

Commit

Permalink
Gen docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass committed Nov 14, 2023
1 parent 8826627 commit fcf98c0
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 22 deletions.
4 changes: 4 additions & 0 deletions packages/docsite/src/data/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export const navigation = [

{ title: "Proposal", href: "/docs/api/proposal-sdk" },

{ title: "Organizations", href: "/docs/api/organizations-sdk" },

{
title: "Organization wallet",
href: "/docs/api/organization-wallet-sdk",
Expand All @@ -93,6 +95,8 @@ export const navigation = [

{ title: "Nft voter", href: "/docs/api/nft-voter-sdk" },

{ title: "Nft delegation", href: "/docs/api/nft-delegation-sdk" },

// DOCS NAVIGATION END
],
},
Expand Down
60 changes: 60 additions & 0 deletions packages/docsite/src/pages/docs/api/nft-delegation-sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Nft Delegation SDK

{% callout title="Quick tip" %}
If you are looking for a quick start guide, check out the [Getting Started](/docs/learn/getting_started) guide. We also have some react examples [here](/docs/learn/react).
{% /callout %}

## Instructions

### delegateV0

#### Accounts

| Name | Mutability | Signer | Docs |
| ----------------- | ---------- | ------ | ---- |
| payer | mut | yes | |
| mint | immut | no | |
| owner | immut | yes | |
| tokenAccount | immut | no | |
| currentDelegation | mut | no | |
| recipient | immut | no | |
| nextDelegation | mut | no | |
| systemProgram | immut | no | |

#### Args

| Name | Type | Docs |
| ---- | ---- | ---- |

### undelegateV0

#### Accounts

| Name | Mutability | Signer | Docs |
| ----------------- | ---------- | ------ | ---- |
| rentRefund | mut | no | |
| owner | immut | yes | |
| currentDelegation | immut | no | |
| prevDelegation | mut | no | |
| delegation | mut | no | |
| systemProgram | immut | no | |

#### Args

| Name | Type | Docs |
| ---- | ---- | ---- |

## Accounts

### DelegationV0

| Field | Type |
| ---------- | --------- |
| owner | publicKey |
| asset | publicKey |
| index | u16 |
| nextOwner | publicKey |
| rentRefund | publicKey |
| bumpSeed | u8 |

## Types
78 changes: 66 additions & 12 deletions packages/docsite/src/pages/docs/api/nft-voter-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you are looking for a quick start guide, check out the [Getting Started](/doc

| Name | Mutability | Signer | Docs |
| --------------- | ---------- | ------ | ------------------------------------------------- |
| refund | mut | no | Account to receive sol refund if marker is closed |
| rentRefund | mut | no | Account to receive sol refund if marker is closed |
| marker | mut | no | |
| nftVoter | immut | no | |
| voter | immut | yes | |
Expand Down Expand Up @@ -75,6 +75,58 @@ If you are looking for a quick start guide, check out the [Getting Started](/doc
| ---- | ---------- | ---- |
| args | VoteArgsV0 | |

### delegatedRelinquishVoteV0

#### Accounts

| Name | Mutability | Signer | Docs |
| --------------- | ---------- | ------ | ------------------------------------------------------ |
| rentRefund | mut | no | Account to receive sol rent_refund if marker is closed |
| marker | mut | no | |
| nftVoter | immut | no | |
| owner | immut | yes | |
| mint | immut | no | |
| metadata | immut | no | |
| delegation | immut | no | |
| proposal | mut | no | |
| proposalConfig | immut | no | |
| stateController | mut | no | |
| onVoteHook | immut | no | |
| proposalProgram | immut | no | |
| systemProgram | immut | no | |

#### Args

| Name | Type | Docs |
| ---- | -------------------- | ---- |
| args | RelinquishVoteArgsV0 | |

### delegatedVoteV0

#### Accounts

| Name | Mutability | Signer | Docs |
| --------------- | ---------- | ------ | ---- |
| payer | mut | yes | |
| marker | mut | no | |
| delegation | immut | no | |
| nftVoter | immut | no | |
| owner | immut | yes | |
| mint | immut | no | |
| metadata | immut | no | |
| proposal | mut | no | |
| proposalConfig | immut | no | |
| stateController | mut | no | |
| onVoteHook | immut | no | |
| proposalProgram | immut | no | |
| systemProgram | immut | no | |

#### Args

| Name | Type | Docs |
| ---- | ---------- | ---- |
| args | VoteArgsV0 | |

## Accounts

### NftVoterV0
Expand All @@ -88,14 +140,16 @@ If you are looking for a quick start guide, check out the [Getting Started](/doc

### VoteMarkerV0

| Field | Type |
| -------- | --------- |
| voter | publicKey |
| nftVoter | publicKey |
| proposal | publicKey |
| mint | publicKey |
| choices | u16 |
| bumpSeed | u8 |
| Field | Type |
| --------------- | --------- |
| voter | publicKey |
| nftVoter | publicKey |
| proposal | publicKey |
| mint | publicKey |
| choices | u16 |
| bumpSeed | u8 |
| delegationIndex | u16 |
| rentRefund | publicKey |

## Types

Expand Down Expand Up @@ -144,9 +198,9 @@ If you are looking for a quick start guide, check out the [Getting Started](/doc

### ProgrammableConfig

| Variant | Fields |
| ------- | ------------------------ |
| V1 | ruleSet: [object Object] |
| Variant | Fields |
| ------- | ------------------------- |
| V1 | rule_set: [object Object] |

### UseMethod

Expand Down
14 changes: 7 additions & 7 deletions packages/docsite/src/pages/docs/api/proposal-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ If you are looking for a quick start guide, check out the [Getting Started](/doc

### ProposalState

| Variant | Fields |
| --------- | ------------------------------------ |
| Draft | |
| Cancelled | |
| Voting | startTs: i64 |
| Resolved | choices: [object Object], endTs: i64 |
| Custom | name: string, bin: bytes |
| Variant | Fields |
| --------- | ------------------------------------- |
| Draft | |
| Cancelled | |
| Voting | start_ts: i64 |
| Resolved | choices: [object Object], end_ts: i64 |
| Custom | name: string, bin: bytes |
4 changes: 2 additions & 2 deletions packages/docsite/src/pages/docs/api/state-controller-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ If you are looking for a quick start guide, check out the [Getting Started](/doc
| Variant | Fields |
| ----------------- | ------------------------ |
| Resolved | choices: [object Object] |
| EndTimestamp | endTs: i64 |
| EndTimestamp | end_ts: i64 |
| OffsetFromStartTs | offset: i64 |
| ChoiceVoteWeight | weightThreshold: u128 |
| ChoiceVoteWeight | weight_threshold: u128 |
| ChoicePercentage | percentage: i32 |
| Top | n: u16 |
| NumResolved | n: u16 |
Expand Down

Large diffs are not rendered by default.

0 comments on commit fcf98c0

Please sign in to comment.