-
Notifications
You must be signed in to change notification settings - Fork 0
/
sdk.go
30 lines (26 loc) · 803 Bytes
/
sdk.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package gaudius
import (
"github.com/alecsavvy/gaudius/gen/contracts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
)
// the one struct to rule them all
type AudiusSdk struct {
Discovery *DiscoveryNode
Content *ContentNode
EntityManager *contracts.EntityManager
EntityManagerAddress *common.Address
EthereumClient *ethclient.Client
AcdcClient *ethclient.Client
Oauth *OauthConfiguration
Contracts *AudiusContracts
}
func NewTestnetSdk() (*AudiusSdk, error) {
params := NewAudiusSdkTestnetParams()
return NewCustomSdk(params)
}
// initializes a new sdk against mainnet
func NewSdk() (*AudiusSdk, error) {
params := NewAudiusSdkMainnetParams()
return NewCustomSdk(params)
}