-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"nuxt.isNuxtApp": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package currency | ||
|
||
type CurrencyOptions struct { | ||
ContractAddress string | ||
Decimal int | ||
} | ||
|
||
type Currency struct { | ||
Symbol string | ||
Options CurrencyOptions | ||
} | ||
|
||
func NewCurrency(symbol string, options CurrencyOptions) *Currency { | ||
return &Currency{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package network | ||
|
||
type EVM struct { | ||
} | ||
|
||
func NewEVM() Network { | ||
return &EVM{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package network | ||
|
||
type Network interface { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package network | ||
|
||
type TRON struct { | ||
} | ||
|
||
func NewTRON() Network { | ||
return &TRON{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package wallet | ||
|
||
type Key struct { | ||
Opt *Options | ||
} | ||
|
||
func NewKey(opts ...Option) *Key { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package wallet | ||
|
||
type Option func(o *Options) | ||
|
||
type Options struct { | ||
Mnemonic string | ||
Index uint32 | ||
} | ||
|
||
type Wallet struct { | ||
Options Options | ||
} | ||
|
||
func AddressIndex(i uint32) Option { | ||
return func(o *Options) { | ||
o.Index = i | ||
} | ||
} | ||
|
||
func Mnemonic(mnemonic string) Option { | ||
return func(o *Options) { | ||
o.Mnemonic = mnemonic | ||
} | ||
} | ||
|
||
func NewWallet(opts ...Option) *Wallet { | ||
opt := Options{} | ||
|
||
for _, o := range opts { | ||
o(&opt) | ||
} | ||
|
||
return &Wallet{ | ||
Options: opt, | ||
} | ||
} |