Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/protocol-ref/document.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Document Overview

Once a [data contract](./data-contract.md) has been created, data can be stored by submitting documents that comply with the document structure specified in the contract. Each document consists of one or more fields and the indices necessary to support querying. Documents are [created](#document-create-transition), [updated](#document-replace-transition), or [deleted](#document-delete-transition) by sending by submitting them to the platform in a [batch state transition](./state-transition.md#batch).
Once a [data contract](./data-contract.md) has been created, data can be stored by submitting documents that comply with the document structure specified in the contract. Each document consists of one or more fields and the indices necessary to support querying. Documents are [created](#document-create-transition), [updated](#document-replace-transition), or [deleted](#document-delete-transition) by sending them to the platform in a [batch state transition](./state-transition.md#batch).

## Document State Transition Details

Expand Down
203 changes: 81 additions & 122 deletions docs/reference/dapi-endpoints-platform-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -3073,15 +3073,15 @@ Retrieves token balances for a specified identity.
::::{tab-set}
:::{tab-item} gRPCurl
```shell
grpcurl -proto protos/platform/v0/platform.proto \
grpcurl -insecure -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=",
"token_ids": ["1122334455667788", "99aabbccddeeff00"],
"identity_id": "fRead5oV4z8PFUZYt2riPRQgH5LhmZQD2PSWFgtctf0=",
"token_ids": ["MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98=", "VJcuY5gL416LbJl3EPqW7wpBvdwS5ITVQoFLJnHEk0Y="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
35.93.25.23:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityTokenBalances
```
:::
Expand All @@ -3093,24 +3093,24 @@ grpcurl -proto protos/platform/v0/platform.proto \
{
"v0": {
"tokenBalances": {
"token_balances": [
"tokenBalances": [
{
"token_id": "1122334455667788",
"balance": 1000
"tokenId": "MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98=",
"balance": "100000"
},
{
"token_id": "99aabbccddeeff00",
"balance": 500
"tokenId": "VJcuY5gL416LbJl3EPqW7wpBvdwS5ITVQoFLJnHEk0Y=",
"balance": "100000"
}
]
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
"height": "1108",
"coreChainLockedHeight": 9760,
"epoch": 27,
"timeMs": "1742496295435",
"protocolVersion": 9,
"chainId": "dash-devnet-gimlet"
}
}
}
Expand All @@ -3137,15 +3137,15 @@ Retrieves the token balances for a list of specified identities.
::::{tab-set}
:::{tab-item} gRPCurl
```shell
grpcurl -proto protos/platform/v0/platform.proto \
grpcurl -insecure -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"identity_ids": ["HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=", "02abcdef"],
"token_id": "MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98=",
"identity_ids": ["fRead5oV4z8PFUZYt2riPRQgH5LhmZQD2PSWFgtctf0="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
35.93.25.23:1443 \
org.dash.platform.dapi.v0.Platform/getIdentitiesTokenBalances
```
:::
Expand All @@ -3156,25 +3156,21 @@ grpcurl -proto protos/platform/v0/platform.proto \
```json
{
"v0": {
"identity_token_balances": {
"identity_token_balances": [
"identityTokenBalances": {
"identityTokenBalances": [
{
"identity_id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=",
"balance": "500"
},
{
"identity_id": "02abcdef",
"balance": "1000"
"identityId": "fRead5oV4z8PFUZYt2riPRQgH5LhmZQD2PSWFgtctf0=",
"balance": "100000"
}
]
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
"height": "1110",
"coreChainLockedHeight": 9764,
"epoch": 27,
"timeMs": "1742496657403",
"protocolVersion": 9,
"chainId": "dash-devnet-gimlet"
}
}
}
Expand All @@ -3201,15 +3197,15 @@ Retrieves information about specified tokens for a given identity.
::::{tab-set}
:::{tab-item} gRPCurl
```shell
grpcurl -proto protos/platform/v0/platform.proto \
grpcurl -insecure -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=",
"token_ids": ["01abcdef", "02abcdef"],
"identity_id": "fRead5oV4z8PFUZYt2riPRQgH5LhmZQD2PSWFgtctf0=",
"token_ids": ["MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
35.93.25.23:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityTokenInfos
```
:::
Expand All @@ -3220,29 +3216,20 @@ grpcurl -proto protos/platform/v0/platform.proto \
```json
{
"v0": {
"token_infos": {
"token_infos": [
{
"token_id": "01abcdef",
"info": {
"frozen": false
}
},
"tokenInfos": {
"tokenInfos": [
{
"token_id": "02abcdef",
"info": {
"frozen": true
}
"tokenId": "MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98="
}
]
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
"height": "1111",
"coreChainLockedHeight": 9769,
"epoch": 27,
"timeMs": "1742496838480",
"protocolVersion": 9,
"chainId": "dash-devnet-gimlet"
}
}
}
Expand All @@ -3269,15 +3256,15 @@ Retrieves token information for a list of specified identities.
::::{tab-set}
:::{tab-item} gRPCurl
```shell
grpcurl -proto protos/platform/v0/platform.proto \
grpcurl -insecure -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"identity_ids": ["HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=", "02abcdef"],
"token_id": "MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98=",
"identity_ids": ["fRead5oV4z8PFUZYt2riPRQgH5LhmZQD2PSWFgtctf0="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
35.93.25.23:1443 \
org.dash.platform.dapi.v0.Platform/getIdentitiesTokenInfos
```
:::
Expand All @@ -3288,29 +3275,20 @@ grpcurl -proto protos/platform/v0/platform.proto \
```json
{
"v0": {
"identity_token_infos": {
"token_infos": [
"identityTokenInfos": {
"tokenInfos": [
{
"identity_id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=",
"info": {
"frozen": false
}
},
{
"identity_id": "02abcdef",
"info": {
"frozen": true
}
"identityId": "fRead5oV4z8PFUZYt2riPRQgH5LhmZQD2PSWFgtctf0="
}
]
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
"height": "1123",
"coreChainLockedHeight": 9806,
"epoch": 27,
"timeMs": "1742499076355",
"protocolVersion": 9,
"chainId": "dash-devnet-gimlet"
}
}
}
Expand All @@ -3336,14 +3314,14 @@ Retrieves the statuses of specified tokens.
::::{tab-set}
:::{tab-item} gRPCurl
```shell
grpcurl -proto protos/platform/v0/platform.proto \
grpcurl -insecure -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_ids": ["01abcdef", "02abcdef"],
"token_ids": ["MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98=", "VJcuY5gL416LbJl3EPqW7wpBvdwS5ITVQoFLJnHEk0Y="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
35.93.25.23:1443 \
org.dash.platform.dapi.v0.Platform/getTokenStatuses
```
:::
Expand All @@ -3354,25 +3332,23 @@ grpcurl -proto protos/platform/v0/platform.proto \
```json
{
"v0": {
"token_statuses": {
"token_statuses": [
"tokenStatuses": {
"tokenStatuses": [
{
"token_id": "01abcdef",
"paused": false
"tokenId": "MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98="
},
{
"token_id": "02abcdef",
"paused": true
"tokenId": "VJcuY5gL416LbJl3EPqW7wpBvdwS5ITVQoFLJnHEk0Y="
}
]
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
"height": "1124",
"coreChainLockedHeight": 9811,
"epoch": 27,
"timeMs": "1742499257308",
"protocolVersion": 9,
"chainId": "dash-devnet-gimlet"
}
}
}
Expand Down Expand Up @@ -3403,20 +3379,19 @@ Retrieves pre-programmed distributions of a specified token.
::::{tab-set}
:::{tab-item} gRPCurl
```shell
grpcurl -proto protos/platform/v0/platform.proto \
grpcurl -insecure -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"token_id": "MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98=",
"start_at_info": {
"start_time_ms": 1724094056000,
"start_recipient": "01abcdef",
"start_recipient_included": true
},
"limit": 10,
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
35.93.25.23:1443 \
org.dash.platform.dapi.v0.Platform/getTokenPreProgrammedDistributions
```
:::
Expand All @@ -3427,30 +3402,14 @@ grpcurl -proto protos/platform/v0/platform.proto \
```json
{
"v0": {
"token_distributions": {
"token_distributions": [
{
"timestamp": 1724094056000,
"distributions": [
{
"recipient_id": "01abcdef",
"amount": "500"
},
{
"recipient_id": "02abcdef",
"amount": "1000"
}
]
}
]
},
"tokenDistributions": {},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
"height": "1125",
"coreChainLockedHeight": 9813,
"epoch": 27,
"timeMs": "1742499438343",
"protocolVersion": 9,
"chainId": "dash-devnet-gimlet"
}
}
}
Expand All @@ -3476,14 +3435,14 @@ Retrieves the total supply of a specified token, including aggregated user accou
::::{tab-set}
:::{tab-item} gRPCurl
```shell
grpcurl -proto protos/platform/v0/platform.proto \
grpcurl -insecure -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"token_id": "MDbQqGnUFMiD96MNa39mwN4TlZQ63Aw1fhLZq0Uam98=",
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
35.93.25.23:1443 \
org.dash.platform.dapi.v0.Platform/getTokenTotalSupply
```
:::
Expand Down