We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e2a0f49 + 64f4539 commit 7a09394Copy full SHA for 7a09394
pkg/stacks/network.go
@@ -27,6 +27,22 @@ func NewStacksTestnet() *StacksNetwork {
27
}
28
29
30
+func NewStacksLocalnet() *StacksNetwork {
31
+ return &StacksNetwork{
32
+ CoreAPIURL: "http://localhost:3999", // Default Stacks local node API port
33
+ Version: TransactionVersionTestnet,
34
+ ChainID: ChainIDTestnet,
35
+ }
36
+}
37
+
38
+func NewStacksCustomNetwork(coreAPIURL string, version TransactionVersion, chainID ChainID) *StacksNetwork {
39
40
+ CoreAPIURL: coreAPIURL,
41
+ Version: version,
42
+ ChainID: chainID,
43
44
45
46
func (n *StacksNetwork) GetAccountAPIURL(address string) string {
47
return fmt.Sprintf("%s/v2/accounts/%s?proof=0", n.CoreAPIURL, address)
48
0 commit comments