Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Re-org #690

Merged
merged 17 commits into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions api/client/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,29 @@ type Admin struct {
client proto.PowergateAdminServiceClient
}

// NewAddress creates a new address.
func (a *Admin) NewAddress(ctx context.Context, addrType string) (*proto.NewAddressResponse, error) {
req := &proto.NewAddressRequest{
Type: addrType,
}
return a.client.NewAddress(ctx, req)
}

// ListAddresses lists all addresses associated with this Powergate.
func (a *Admin) ListAddresses(ctx context.Context) (*proto.ListAddressesResponse, error) {
return a.client.ListAddresses(ctx, &proto.ListAddressesRequest{})
}

// SendFil sends FIL from an address associated with this Powergate to any other address.
func (a *Admin) SendFil(ctx context.Context, from, to string, amount int64) (*proto.SendFilResponse, error) {
req := &proto.SendFilRequest{
From: from,
To: to,
Amount: amount,
}
return a.client.SendFil(ctx, req)
}

// CreateStorageProfile creates a new Powergate storage profile, returning the instance ID and auth token.
func (a *Admin) CreateStorageProfile(ctx context.Context) (*proto.CreateStorageProfileResponse, error) {
return a.client.CreateStorageProfile(ctx, &proto.CreateStorageProfileRequest{})
Expand Down
22 changes: 0 additions & 22 deletions api/client/asks.go

This file was deleted.

33 changes: 0 additions & 33 deletions api/client/asks_test.go

This file was deleted.

Loading