Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
huuhait committed Jan 12, 2023
1 parent 967d2e1 commit dd94ee2
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"nuxt.isNuxtApp": false
}
15 changes: 15 additions & 0 deletions pkg/currency/currency.go
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{}
}
8 changes: 8 additions & 0 deletions pkg/network/evm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package network

type EVM struct {
}

func NewEVM() Network {
return &EVM{}
}
4 changes: 4 additions & 0 deletions pkg/network/network.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package network

type Network interface {
}
8 changes: 8 additions & 0 deletions pkg/network/tron.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package network

type TRON struct {
}

func NewTRON() Network {
return &TRON{}
}
9 changes: 9 additions & 0 deletions pkg/wallet/key.go
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 {

}
36 changes: 36 additions & 0 deletions pkg/wallet/wallet.go
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,
}
}

0 comments on commit dd94ee2

Please sign in to comment.