Documentation ¶
Overview ¶
Copyright 2020 dfuse Platform Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func AsciiString(data []byte) string
- func ProgramID() solana.PublicKey
- type Instruction
- func (i *Instruction) Accounts() (out []*solana.AccountMeta)
- func (i *Instruction) Data() ([]byte, error)
- func (i *Instruction) MarshalWithEncoder(encoder *bin.Encoder) error
- func (i *Instruction) ProgramID() solana.PublicKey
- func (i *Instruction) TextEncode(encoder *text.Encoder, option *text.Option) error
- func (i *Instruction) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
- type Logo
- type Name
- type RegisterToken
- type RegisterTokenAccounts
- type Symbol
- type TokenMeta
- type Website
Constants ¶
View Source
const TOKEN_META_SIZE = 229
Variables ¶
View Source
var InstructionDefVariant = bin.NewVariantDefinition(bin.Uint32TypeIDEncoding, []bin.VariantType{ {"register_token", (*RegisterToken)(nil)}, })
Functions ¶
func AsciiString ¶
Types ¶
type Instruction ¶
type Instruction struct {
bin.BaseVariant
}
func DecodeInstruction ¶
func DecodeInstruction(accounts []*solana.AccountMeta, data []byte) (*Instruction, error)
func NewRegisterTokenInstruction ¶
func NewRegisterTokenInstruction(logo Logo, name Name, symbol Symbol, website Website, tokenMetaKey, ownerKey, tokenKey solana.PublicKey) *Instruction
func (*Instruction) Accounts ¶
func (i *Instruction) Accounts() (out []*solana.AccountMeta)
func (*Instruction) Data ¶
func (i *Instruction) Data() ([]byte, error)
func (*Instruction) MarshalWithEncoder ¶ added in v0.4.0
func (i *Instruction) MarshalWithEncoder(encoder *bin.Encoder) error
func (*Instruction) ProgramID ¶
func (i *Instruction) ProgramID() solana.PublicKey
func (*Instruction) TextEncode ¶
func (*Instruction) UnmarshalWithDecoder ¶ added in v0.4.0
func (i *Instruction) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type RegisterToken ¶
type RegisterToken struct { Logo Logo Name Name Website Website Symbol Symbol Accounts *RegisterTokenAccounts `bin:"-"` }
func (*RegisterToken) SetAccounts ¶
func (i *RegisterToken) SetAccounts(accounts []*solana.AccountMeta) error
type RegisterTokenAccounts ¶
type RegisterTokenAccounts struct { TokenMeta *solana.AccountMeta `text:"linear,notype"` Owner *solana.AccountMeta `text:"linear,notype"` Token *solana.AccountMeta `text:"linear,notype"` }
Click to show internal directories.
Click to hide internal directories.