gRPC — modified methods
Endpoint:
iota-grpc.nownodes.ioAuthentication:
api-key: YOUR_API_KEYOfficial proto sources:
https://github.com/iotaledger/iota
https://github.com/iotaledger/iota-rust-sdkiota.grpc.v1.state_service.StateService
ListDynamicFields
Changed. Pagination fix: a page no longer skips an unchanged entry when the entry referenced by the page token was removed or changed between requests.
Description: Lists the Dynamic Fields owned by a parent object from the iota.grpc.v1.state_service.StateService gRPC service. Results are paginated via pageSize (default 50, max 1000) and pageToken; the default read_mask is parent,field_id. Full method:
iota.grpc.v1.state_service.StateService/ListDynamicFieldsRequest:
{
"parent": {
"objectId": "BASE64_OBJECT_ID"
},
"pageSize": 50
}Example:
grpcurl \
-insecure \
-H 'api-key: YOUR_API_KEY' \
-d '{"parent":{"objectId":"BASE64_OBJECT_ID"},"pageSize":50}' \
'iota-grpc.nownodes.io' \
iota.grpc.v1.state_service.StateService/ListDynamicFieldsResponse example:
{
"dynamicFields": [
{
"kind": "FIELD",
"parent": {
"objectId": "BASE64_OBJECT_ID"
},
"fieldId": {
"objectId": "BASE64_OBJECT_ID"
},
"name": {
"data": "BASE64_BCS"
},
"value": {
"data": "BASE64_BCS"
},
"valueType": "u64"
}
],
"nextPageToken": "BASE64_PAGE_TOKEN"
}ListOwnedObjects
Changed. Pagination fix: a page no longer skips an unchanged entry when the entry referenced by the page token changed between requests (for example, the cursor coin balance changed).
Description: Lists the Owned Objects held by an address from the iota.grpc.v1.state_service.StateService gRPC service. An optional objectType filter restricts results (for example 0x2::coin::Coin<0x2::iota::IOTA>). Results are paginated (default 50, max 1000); the default read_mask is reference,bcs. Full method:
iota.grpc.v1.state_service.StateService/ListOwnedObjectsRequest:
{
"owner": {
"address": "BASE64_ADDRESS"
},
"objectType": "0x2::coin::Coin<0x2::iota::IOTA>",
"pageSize": 50
}Example:
grpcurl \
-insecure \
-H 'api-key: YOUR_API_KEY' \
-d '{"owner":{"address":"BASE64_ADDRESS"},"objectType":"0x2::coin::Coin<0x2::iota::IOTA>","pageSize":50}' \
'iota-grpc.nownodes.io' \
iota.grpc.v1.state_service.StateService/ListOwnedObjectsResponse example:
{
"objects": [
{
"reference": {
"objectId": {
"objectId": "BASE64_OBJECT_ID"
},
"version": "123456",
"digest": {
"digest": "BASE64_DIGEST"
}
},
"bcs": {
"data": "BASE64_BCS"
}
}
],
"nextPageToken": "BASE64_PAGE_TOKEN"
}iota.grpc.v1.transaction_execution_service.TransactionExecutionService
SimulateTransactions
Changed. A transaction larger than max_tx_size_bytes is rejected with a per-item InvalidArgument error.
Description: Simulates one or more transactions against the iota.grpc.v1.transaction_execution_service.TransactionExecutionService gRPC service without broadcasting them, returning predicted effects, a suggested gas price, and command results. Transactions are simulated sequentially in order. Signatures are not required for simulation. Full method:
iota.grpc.v1.transaction_execution_service.TransactionExecutionService/SimulateTransactionsRequest:
{
"transactions": [
{
"transaction": {
"bcs": {
"data": "BASE64_BCS"
}
}
}
]
}Example:
grpcurl \
-insecure \
-H 'api-key: YOUR_API_KEY' \
-d '{"transactions":[{"transaction":{"bcs":{"data":"BASE64_BCS"}}}]}' \
'iota-grpc.nownodes.io' \
iota.grpc.v1.transaction_execution_service.TransactionExecutionService/SimulateTransactionsResponse example:
{
"transactionResults": [
{
"simulatedTransaction": {
"executedTransaction": {
"transaction": {
"digest": {
"digest": "BASE64_DIGEST"
}
},
"effects": {
"digest": {
"digest": "BASE64_DIGEST"
}
}
},
"suggestedGasPrice": "1000"
}
}
]
}