메인 콘텐츠로 건너뛰기
POST
/
v1
/
spl
/
login
Login
curl --request POST \
  --url https://payments.magicblock.app/v1/spl/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "pubkey": "Bt9oNR5cCtnfuMmXgWELd6q5i974PdEMQDUE55nBC57L",
  "challenge": "1234567890",
  "signature": "1234567890"
}
'
{
  "token": "1234567890"
}

본문

application/json
pubkey
string
필수

The public key of the wallet that will read private data.

예시:

"Bt9oNR5cCtnfuMmXgWELd6q5i974PdEMQDUE55nBC57L"

challenge
string
필수

The challenge string returned by /v1/spl/challenge.

예시:

"1234567890"

signature
string
필수

The wallet's signature over the challenge string.

예시:

"1234567890"

cluster

Optional. Use mainnet for BASE_RPC_URL and EPHEMERAL_RPC_URL, devnet for BASE_DEVNET_RPC_URL and EPHEMERAL_DEVNET_RPC_URL, or provide a custom http(s) RPC URL to override the base RPC while keeping the configured ephemeral RPC.

사용 가능한 옵션:
mainnet,
devnet
예시:

"mainnet"

mock
boolean

Optional. When true, the API uses a mock login flow for testing. Defaults to false.

예시:

false

응답

Authentication token

token
string
필수

The authentication token provided by the Private Ephemeral Rollup.