Skip to content

Errors and false values with GET after executing the transfer of TA ownership. #63

Open
@amadison79

Description

I am opening this issue because I noticed that after executing the transfer of TA ownership, all HTTP GET methods return errors or false values.

I created two accounts for testing Astraeus; there is no sensitive data for me in these accounts. These private keys have no funds and will never have any. I’m using them here solely to illustrate my point.

Generate the Timed Signature required for API requests.

Account 1

go run scripts/utils/generate_timed_signature/main.go 1759244400 fcbaddbb2e45d290d9f5c6bdb7473cd757fd985118c865849e24f02471916a6c

Address: 398db2d227da891af30be7d8ac7154de88c5e3d6
Message Hash: 7f7aba4ade1c5e76048bb3991281a929b06354f52023a8796f9a5181b6d574b0
Signature: 56e70477d2522a9a5d25da0308cb20ab77f131bad7f7808a73673541b84a6ee02f4d657062a69dee9420748716ff2e2c195ec89414d8d39abae01929476753af1b

Account 2

go run scripts/utils/generate_timed_signature/main.go 1759244400 c89e27058c8a932d2d45a98ad268bbf7c4387f12f2009253815963fddddbb871

Address: 9d1d67b7b5b0f8bc0f33bb1a6e7a9f94594bfca1
Message Hash: 40b15663dd3cf56c144b47f471747ef780500cc6509b9fda2dd3850073a2fc27
Signature: eb9ce57c2e33d3c8bd33fae0948aa9acff0d0f5f012b165776457e0dd12d77b06588fa3dbe3c06d77a3751339cc78532d29c07867ff3ab48f8c90647d71624761c

Create Account Request to API Server

 curl -X POST http://localhost:8080/v1/accounts -d '{
  "proof": {
    "validFor": 1759244400,
    "messageHash": "7f7aba4ade1c5e76048bb3991281a929b06354f52023a8796f9a5181b6d574b0",
    "signature": "56e70477d2522a9a5d25da0308cb20ab77f131bad7f7808a73673541b84a6ee02f4d657062a69dee9420748716ff2e2c195ec89414d8d39abae01929476753af1b",
    "signer": "398db2d227da891af30be7d8ac7154de88c5e3d6"
    }
}'

{"txHash":"0x301176989ec849f91cf01a2955aa5448d922ddba09308c9b66d69a457dc48f03", "accountId":"0x55af78de60375f0792406998c6b4a3e6"}

Get account details

curl -X GET http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6
{"account":{"accountId":"0x55af78de60375f0792406998c6b4a3e6", "owner":"0x398dB2D227dA891aF30BE7d8aC7154DE88c5e3D6", "publicKeyX":"5fc716015627c80df77ff36954e2f8d15c9182ee8b301b9886aea86c3674f086", "publicKeyY":"b3053ffacdd830534ff018e3983bd2ef18f68a72ae49ae3ff070497def04547a", "curve":"CURVE_ECDSA", "isLocked":true}}

curl -X GET http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6/approved/0x398dB2D227dA891aF30BE7d8aC7154DE88c5e3D6
{"result":true}

curl -X GET http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6/lockedc6b4a3e6/locked
{"result":true}

curl -X GET http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6/owner/0x398dB2D227dA891aF30BE7d8aC7154DE88c5e3D6C7154DE88c5e3D6
{"result":true}

Approve Address Request to API Server

curl -s -X POST http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6/approve -d '{
  "base": {
    "account_id": "0x55af78de60375f0792406998c6b4a3e6",
    "proof": {
    "validFor": 1759244400,
    "messageHash": "7f7aba4ade1c5e76048bb3991281a929b06354f52023a8796f9a5181b6d574b0",
    "signature": "56e70477d2522a9a5d25da0308cb20ab77f131bad7f7808a73673541b84a6ee02f4d657062a69dee9420748716ff2e2c195ec89414d8d39abae01929476753af1b",
    "signer": "398db2d227da891af30be7d8ac7154de88c5e3d6"
  }
  },
  "address": "0x9d1D67b7b5b0f8bC0F33BB1A6E7A9F94594BFCA1"
}'
                
{"txHash":"0xd8714f3768155996da2f669acf000a172c74a9b9436bcaa1b6270487b5e9fde8"}

Transfer Account Request to API Server

curl -s -X POST http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6/transfer -d '{
  "base": {
    "account_id": "0x55af78de60375f0792406998c6b4a3e6",
    "proof": {
    "validFor": 1759244400,
    "messageHash": "7f7aba4ade1c5e76048bb3991281a929b06354f52023a8796f9a5181b6d574b0",
    "signature": "56e70477d2522a9a5d25da0308cb20ab77f131bad7f7808a73673541b84a6ee02f4d657062a69dee9420748716ff2e2c195ec89414d8d39abae01929476753af1b",
    "signer": "398db2d227da891af30be7d8ac7154de88c5e3d6"
    }
  },
  "address": "0x9d1D67b7b5b0f8bC0F33BB1A6E7A9F94594BFCA1"
}'

{"txHash":"0x3e7992fdd921e3a6d9cd624a76d5c93c94e63778e6547b1184fdd285efe087e3"}

Get account details afterward : I got errors and false result

curl -X GET http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6
{"code":5, "message":"account not found", "details":[]}

curl -X GET http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6/approved/0x9d1D67b7b5b0f8bC0F33BB1A6E7A9F94594BFCA1
{"result":false}

curl -X GET http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6/lockedc6b4a3e6/locked
{"code":5, "message":"Not Found", "details":[]}

curl -X GET http://localhost:8080/v1/accounts/0x55af78de60375f0792406998c6b4a3e6/owner/0x9d1D67b7b5b0f8bC0F33BB1A6E7A9F94594BFCA1
{"result":false}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions