create new attacounts

Returns a list of addresses and private keys.

REQUEST

GET https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID

REQUEST URL

https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID/?number=xx&category=create

REQUEST PAYLOAD

    • number: An integer number, how many accounts will be created.
    • category: "create", a fixed value.

RESPONSE

BODY

{
"jsonrpc": "2.0",
"id": 0,
"result": [{
        "addr": "0x6eaba67308fc1bc51cd7a85d6e60a345870ba2ff",
        "privateKey": "4a6f04e21b464978df763e52ab4a39e5472155b43c94b333d7ae187d0b2ebae3"
}, {
        "addr": "0x9706b2c20e445bc70e516acd430a0657eb98a6aa",
        "privateKey": "912f05a69ea507cd2dc3a1216b615c8d601d68db19d1691dfe964ea0b8b57eb6"
}, {
        "addr": "0x4eb91c71c4b7155040bfe3c1cebe7d94046a1841",
        "privateKey": "8388269a8ae6cd3e105efe71e2e43d7f5392aa1de18a0bc1d19d41f2e3b4321e"
}, {
        "addr": "0x8849fd2b38c32c43029ac4ad87b9c3becf06672f",
        "privateKey": "375ca96f32ad353ed5b351ca9d81b32bc89f1b562d01a6b4ec9f599c02bb52ee"
}, {
        "addr": "0x115871bf65be5cb0c70aeda22c99a88d2f7520e4",
        "privateKey": "06a1c4afd74981877567e189123d3c0e0e852351c955039d4c863c7ca2e087c7"
}, {
        "addr": "0xc3a3e50900dd8989a1abe239400fa9319b9a4404",
        "privateKey": "69269b22c27d2f3b300ccfc2cab0f91acf091b4fb31c9122b23454372c9e48e0"
}, {
        "addr": "0x81a4a5f9f452779ee003acd669602cf02dcc64fd",
        "privateKey": "ee93cfa11470c17b99ac934487f8c2490815a677912ff36a46603ba2aa2d2c43"
}, {
        "addr": "0x437f7ae423f00d7df1ac6c11d6c40e1950226e9f",
        "privateKey": "109fc3605e908ca24809ea955116e43bb483e12323442f3a11c247ec6243dfd4"
}, {
        "addr": "0x7c88566e19bd9ce5ec40529141adf1e5fd69ea3b",
        "privateKey": "a70881b176aff6711f02d89224cad225ec7956fb50f6c2f0eba86a0ecf7c09c1"
}, {
        "addr": "0x8f84d52c16da0116daf1975c9dd710f37243f610",
        "privateKey": "a53296beaed1a697179306d8348355240a6be7dc87d8a3bdf1a33be983809c1a"
}]
}

Get Balance

Returns the balance of the account of given address.

REQUEST

GET https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID

REQUEST URL

https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID/?address=0xxx&category=balance

REQUEST PAYLOAD

    • address: a string representing the address (42 length) to check for balance.
    • category: "balance", a fixed value.

RESPONSE

BODY

{
"jsonrpc": "2.0",
"id": 0,
"result": "0x34c02d65a000"
}

Get Nonce

Returns the nonce of the account of given address.

REQUEST

GET https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID

REQUEST URL

https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID/?address=0xxx&category=nonce

REQUEST PAYLOAD

    • address: a string representing the address (42 length) to check for nonce.
    • category: "nonce", a fixed value.

RESPONSE

BODY

{
"jsonrpc": "2.0",
"id": 0,
"result": "0x384a"
}

Get ERC20 Token Balance

Returns the token balance of the account of given address and contract.

REQUEST

GET https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID

REQUEST URL

https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID/?address=0xxx&contractAddr=0xxx&category=erc20

REQUEST PAYLOAD

    • address: a string representing the address (42 length) to check for balance.
    • contractAddr: The address of a contract (42 length).
    • category: "erc20", a fixed value.

RESPONSE

BODY

{
"jsonrpc": "2.0",
"id": 0,
"result": "0.006906250000065536"
}

Get Keystore

Returns the Keystore of the account of given private key.

REQUEST

GET https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID

REQUEST URL

https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID/?privateKey=xx&password=xx&category=keystore

REQUEST PAYLOAD

    • privateKey: a string representing the private key (64 length) to generate for keystore.
    • password: a password to generate for keystore.
    • category: "keystore", a fixed value.

RESPONSE

BODY

{
"jsonrpc":"2.0",
"id":0,
"result":{"version":3,"id":"64e123c1-a94c-4059-ad9b-c5d901ef17ef","address":"c3a3e50900dd8989a1abe239400fa9319b9a4404","crypto":{"ciphertext":"ba2ad3beb4d2306b192f3efc2905ff7024acf840ef6de6d533899a3831160bbf","cipherparams":{"iv":"63a48a696cfec16c70092e788478bc16"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"519423745cc03fdf50c01ec3496fe0864d627fe5a67f7bdd8c110e4c4399439b","n":262144,"r":8,"p":1},"mac":"ce59fb8db5f20b513df84e5d8fd8fb83026d9349e3988e6f3e69579704e49bbc"}}
}

Get Address

Returns the Address of the account of given private key.

REQUEST

GET https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID

REQUEST URL

https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID/?privateKey=xx&category=PK2Address

REQUEST PAYLOAD

    • privateKey: a string representing the private key (64 length) to generate for keystore.
    • category: "PK2Address", a fixed value.

RESPONSE

BODY

{
"jsonrpc":"2.0",
"id":0,
"result":"c3a3e50900dd8989a1abe239400fa9319b9a4404"
}

Send Transaction

Returns the balance of the account of given address.

REQUEST

GET https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID

REQUEST URL

https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID/?from=0xxx&privateKey=xx&to=0xxx&value=xx&nonce=0xxx&estimateGas=gasPrice&category=transaction

mainnet network only

https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID/?from=0xxx&privateKey=xx&contractAddr=xx&to=0xxx&value=xx&nonce=0xxx&estimateGas=gasPrice&category=transaction

REQUEST PAYLOAD

    • from: The address the transaction is sent from.
    • privateKey: The private key of the from address.
    • contractAddr: [optional] The address of a contract (42 length). if you need make a contract transaction.
    • to: The address the transaction is directed to.
    • value: Integer of the value sent with this transaction
    • nonce: [optional,hex value,e.g.: 0x384a] The nonce of the from address (42 length). if you need make multiple transactions in a short time.get nonce here
    • category: "transaction", a fixed value.
    • estimateGas: [optional]: "gasPrice", a fixed value, if you need estimate this transaction gas price.

RESPONSE

BODY

{
"jsonrpc": "2.0",
"id": 0,
"result": "0x7be73a00651336685000af14ac908cc48874c7108e63651a9e15d0f8a01169f5"
}

Get Confirmed Block

Returns the confirmed block of given transaction hash.

REQUEST

GET https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID

REQUEST URL

https://cradlegate.com/simple/mainnet/YOUR-PROJECT-ID/?thx=0xxx&category=confirmedBlk

REQUEST PAYLOAD

    • thx: the transaction hash
    • category: "confirmedBlk", a fixed value.

RESPONSE

BODY

{
"jsonrpc": "2.0",
"id": 0,
"result": "5",
"status": "ok",
"msg": "success"
}