mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
22 lines
553 B
Go
22 lines
553 B
Go
// Copyright (C) 2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package blockchain
|
|
|
|
import (
|
|
"github.com/luxfi/node/v2/v2/vms/platformvm"
|
|
|
|
"github.com/luxfi/cli/v2/sdk/network"
|
|
"github.com/luxfi/cli/v2/sdk/utils"
|
|
|
|
"github.com/luxfi/ids"
|
|
)
|
|
|
|
func GetSubnet(subnetID ids.ID, network network.Network) (platformvm.GetSubnetClientResponse, error) {
|
|
api := network.Endpoint
|
|
pClient := platformvm.NewClient(api)
|
|
ctx, cancel := utils.GetAPIContext()
|
|
defer cancel()
|
|
return pClient.GetSubnet(ctx, subnetID)
|
|
}
|