This section describes how to view details of storage purchased by a user.
The reference code is as follows:
packagemainimport ("context""fmt" cess "github.com/CESSProject/cess-go-sdk""github.com/CESSProject/cess-go-sdk/core/utils")var RPC_ADDRS = []string{"wss://testnet-rpc0.cess.cloud/ws/","wss://testnet-rpc1.cess.cloud/ws/","wss://testnet-rpc2.cess.cloud/ws/",}// User account to viewvar account_user ="cXfyomKDABfehLkvARFE854wgDJFMbsxwAJEHezRb6mfcAi2y"funcmain() { sdk, err := cess.New( context.Background(), cess.ConnectRpcAddrs(RPC_ADDRS), )if err !=nil {panic(err) }// Resolve the public key of the account publicKey, err := utils.ParsingPublickey(account_user)if err !=nil {panic(err) }// Query user space information fmt.Println(sdk.QueryUserSpaceInfo(publicKey))}