4mica Services JSON-RPC API
Body
jsonrpcstring · enumRequiredPossible values:
methodstringRequired
paramsarrayOptional
idone ofRequired
stringOptional
integerOptional
Responses
200
Core public parameters
application/json
jsonrpcstringOptional
idone ofOptional
stringOptional
integerOptional
post/core/getPublicParams
POST /core/getPublicParams HTTP/1.1
Host: develop.4mica.xyz
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"jsonrpc": "2.0",
"method": "core_getPublicParams",
"params": [],
"id": 1
}200
Core public parameters
{
"jsonrpc": "text",
"id": "text",
"result": {
"public_key": [
1
]
},
"error": {
"code": 1,
"message": "text",
"data": "text"
}
}Body
jsonrpcstring · enumRequiredPossible values:
methodstringRequired
paramsarrayOptional
idone ofRequired
stringOptional
integerOptional
Responses
200
Success or error
application/json
jsonrpcstringOptional
idone ofOptional
stringOptional
integerOptional
resultnullOptional
post/core/registerUser
POST /core/registerUser HTTP/1.1
Host: develop.4mica.xyz
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"jsonrpc": "2.0",
"method": "core_registerUser",
"params": [
"USER_ADDR"
],
"id": 1
}200
Success or error
{
"jsonrpc": "text",
"id": "text",
"result": null,
"error": {
"code": 1,
"message": "text",
"data": "text"
}
}Body
jsonrpcstring · enumRequiredPossible values:
methodstringRequired
paramsarrayOptional
idone ofRequired
stringOptional
integerOptional
Responses
200
User info or null if not found
application/json
jsonrpcstringOptional
idone ofOptional
stringOptional
integerOptional
post/core/getUser
POST /core/getUser HTTP/1.1
Host: develop.4mica.xyz
Content-Type: application/json
Accept: */*
Content-Length: 71
{
"jsonrpc": "2.0",
"method": "core_getUser",
"params": [
"USER_ADDR"
],
"id": 1
}200
User info or null if not found
{
"jsonrpc": "text",
"id": "text",
"result": {
"deposit": 1,
"available_deposit": 1,
"transactions": [
{
"user_addr": "text",
"recipient_addr": "text",
"tx_hash": "text",
"amount": 1,
"verified": true,
"finalized": true,
"failed": true,
"cert": "text",
"created_at": 1
}
]
},
"error": {
"code": 1,
"message": "text",
"data": "text"
}
}Body
jsonrpcstring · enumRequiredPossible values:
methodstringRequired
paramsarrayOptional
idone ofRequired
stringOptional
integerOptional
Responses
200
Payment certificate
application/json
jsonrpcstringOptional
idone ofOptional
stringOptional
integerOptional
post/core/issuePaymentCert
POST /core/issuePaymentCert HTTP/1.1
Host: develop.4mica.xyz
Content-Type: application/json
Accept: */*
Content-Length: 109
{
"jsonrpc": "2.0",
"method": "core_issuePaymentCert",
"params": [
"USER_ADDR",
"RECIPIENT_ADDR",
"TX_ID",
2.5
],
"id": 1
}200
Payment certificate
{
"jsonrpc": "text",
"id": "text",
"result": {
"claims": "text",
"signature": "text"
},
"error": {
"code": 1,
"message": "text",
"data": "text"
}
}Body
jsonrpcstring · enumRequiredPossible values:
methodstringRequired
paramsarrayOptional
idone ofRequired
stringOptional
integerOptional
Responses
200
List of transactions
application/json
jsonrpcstringOptional
idone ofOptional
stringOptional
integerOptional
post/core/getTransactionsByHash
POST /core/getTransactionsByHash HTTP/1.1
Host: develop.4mica.xyz
Content-Type: application/json
Accept: */*
Content-Length: 99
{
"jsonrpc": "2.0",
"method": "core_getTransactionsByHash",
"params": [
[
"TX_HASH_1",
"TX_HASH_2"
]
],
"id": 1
}200
List of transactions
{
"jsonrpc": "text",
"id": "text",
"result": [
{
"user_addr": "text",
"recipient_addr": "text",
"tx_hash": "text",
"amount": 1,
"verified": true,
"finalized": true,
"failed": true,
"cert": "text",
"created_at": 1
}
],
"error": {
"code": 1,
"message": "text",
"data": "text"
}
}Body
jsonrpcstring · enumRequiredPossible values:
methodstringRequired
paramsarrayOptional
idone ofRequired
stringOptional
integerOptional
Responses
200
Verification result
application/json
jsonrpcstringOptional
idone ofOptional
stringOptional
integerOptional
resultstring · enumOptionalPossible values:
post/core/verifyTransaction
POST /core/verifyTransaction HTTP/1.1
Host: develop.4mica.xyz
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"jsonrpc": "2.0",
"method": "core_verifyTransaction",
"params": [
"TX_HASH"
],
"id": 1
}200
Verification result
{
"jsonrpc": "text",
"id": "text",
"result": "Verified",
"error": {
"code": 1,
"message": "text",
"data": "text"
}
}Body
jsonrpcstring · enumRequiredPossible values:
methodstringRequired
paramsarrayOptional
idone ofRequired
stringOptional
integerOptional
Responses
200
Verification result
application/json
jsonrpcstringOptional
idone ofOptional
stringOptional
integerOptional
resultone ofOptional
or
or
post/recipient/verifyPaymentGuarantee
POST /recipient/verifyPaymentGuarantee HTTP/1.1
Host: develop.4mica.xyz
Content-Type: application/json
Accept: */*
Content-Length: 145
{
"jsonrpc": "2.0",
"method": "recipient_verifyPaymentGuarantee",
"params": [
{
"claims": "HEX_ENCODED_JSON",
"signature": "HEX_ENCODED_SIGNATURE"
}
],
"id": 1
}200
Verification result
{
"jsonrpc": "text",
"id": "text",
"result": {
"result": "Verified",
"claims": {
"claims": "text",
"signature": "text"
}
},
"error": {
"code": 1,
"message": "text",
"data": "text"
}
}Last updated