public BitGoClient(BitGoNetwork network, string token = null) { _network = network; _baseUrl = new Uri(network == BitGoNetwork.Main ? MainBaseUrl : TestBaseUrl); if (!string.IsNullOrEmpty(token)) { _token = ConvertToSecureString(token); } _sjcl = new SjclManaged(); Keychains = new KeychainService(this); Wallets = new WalletService(this); WalletAddresses = new WalletAddressService(this); User = new UserService(this); Labels = new LabelService(this); Market = new MarketService(this); Transactions = new TransactionService(this); Instant = new InstantService(this); Billing = new BillingService(this); Webhooks = new WebhookService(this); PendingApprovals = new PendingApprovalService(this); }
public BitGoApi(string accessToken, BitGoNetwork network = BitGoNetwork.Main) { this.EndpointUrl = network == BitGoNetwork.Main ? MainPublicApi : TestPublicApi; this.SetAccessToken(accessToken); }