diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1f2b05c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "nuxt.isNuxtApp": false +} \ No newline at end of file diff --git a/pkg/currency/currency.go b/pkg/currency/currency.go new file mode 100644 index 0000000..30bf6bf --- /dev/null +++ b/pkg/currency/currency.go @@ -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{} +} diff --git a/pkg/network/evm.go b/pkg/network/evm.go new file mode 100644 index 0000000..518e415 --- /dev/null +++ b/pkg/network/evm.go @@ -0,0 +1,8 @@ +package network + +type EVM struct { +} + +func NewEVM() Network { + return &EVM{} +} diff --git a/pkg/network/network.go b/pkg/network/network.go new file mode 100644 index 0000000..cea7fa8 --- /dev/null +++ b/pkg/network/network.go @@ -0,0 +1,4 @@ +package network + +type Network interface { +} diff --git a/pkg/network/tron.go b/pkg/network/tron.go new file mode 100644 index 0000000..df106ca --- /dev/null +++ b/pkg/network/tron.go @@ -0,0 +1,8 @@ +package network + +type TRON struct { +} + +func NewTRON() Network { + return &TRON{} +} diff --git a/pkg/wallet/key.go b/pkg/wallet/key.go new file mode 100644 index 0000000..7c71287 --- /dev/null +++ b/pkg/wallet/key.go @@ -0,0 +1,9 @@ +package wallet + +type Key struct { + Opt *Options +} + +func NewKey(opts ...Option) *Key { + +} diff --git a/pkg/wallet/wallet.go b/pkg/wallet/wallet.go new file mode 100644 index 0000000..d9abee2 --- /dev/null +++ b/pkg/wallet/wallet.go @@ -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, + } +}