Documentation
¶
Index ¶
- Variables
- func Request(ctx context.Context, method, path string, body []byte) ([]byte, error)
- func RevokeTransaction(ctx context.Context, id string, chain int64, signature string) error
- func SetBaseUri(base string)
- type Account
- type Accountant
- type AccountantOutputs
- type AssetBalance
- type Chain
- type Deposit
- type Head
- type Inheritance
- type Output
- type Recovery
- type RecoveryRequest
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProdHost = "https://observer.mixin.one" TestHost = "https://safe.mixin.dev" )
Functions ¶
func RevokeTransaction ¶
func SetBaseUri ¶
func SetBaseUri(base string)
Types ¶
type Account ¶
type Account struct {
ID string `json:"id"`
Address string `json:"address"`
Chain int64 `json:"chain"`
Keys []string `json:"keys"`
Outputs []Output `json:"outputs"` // For bitcoin, litecoin: unspent outputs,
Pendings []Output `json:"pendings"` // For bitcoin, litecoin: signed outptus,
Changes []Output `json:"changes"` // For bitcoin, litecoin: unreceived changes
Balances map[string]AssetBalance `json:"balances"` // For evm chains: unspent balances,
PendingBalances map[string]AssetBalance `json:"pending_balances"` // For evm chains: signed balances,
Nonce int64 `json:"nonce"` // For evm chains
Script string `json:"script"`
State string `json:"state"`
Migrated bool `json:"migrated"`
SafeAssetId string `json:"safe_asset_id"`
Error any `json:"error,omitempty"`
}
func ApproveAccount ¶
func CloseAccount ¶
type Accountant ¶
type Accountant struct {
Outputs AccountantOutputs `json:"outputs"`
}
type AccountantOutputs ¶
type AssetBalance ¶
type Chain ¶
type Chain struct {
ID string `json:"id"`
Chain int64 `json:"chain"`
Head *Head `json:"head"`
Accountant Accountant `json:"accountant,omitempty"` // For bitcoin, litecoin
Sender string `json:"sender,omitempty"` // For evm chains
}
type Deposit ¶
type Deposit struct {
Amount string `json:"amount"`
AssetID string `json:"asset_id"`
Chain int64 `json:"chain"`
Change bool `json:"change"`
OutputIndex int64 `json:"output_index"`
Receiver string `json:"receiver"`
TransactionHash string `json:"transaction_hash"`
Sender string `json:"sender"`
SentHash string `json:"sent_hash"`
State string `json:"state"` // done | pending
UpdatedAt time.Time `json:"updated_at"`
CreatedAt time.Time `json:"created_at"`
}
type Inheritance ¶ added in v1.2.0
type Inheritance struct {
LockId string `json:"lock_id"`
RequestId string `json:"request_id"`
Hash string `json:"hash"`
Holder string `json:"holder"`
Address string `json:"address"`
Chain int64 `json:"chain"`
Duration uint16 `json:"duration"` // lock for hours
Status string `json:"state"` // initial | active | revoked
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func ReadAccountInheritances ¶ added in v1.2.0
func ReadAccountInheritances(ctx context.Context, id string) ([]*Inheritance, error)
type Recovery ¶
type Recovery struct {
ID string `json:"id"`
Address string `json:"address"`
Chain int64 `json:"chain"`
Holder string `json:"holder"`
Observer string `json:"observer"`
Hash string `json:"hash"`
Raw string `json:"raw"`
State string `json:"state"`
Error any `json:"error,omitempty"`
}
func SignRecovery ¶
type RecoveryRequest ¶ added in v1.2.0
type Transaction ¶
type Transaction struct {
AccountID string `json:"account_id"`
AccountAddress string `json:"account_address"`
ID string `json:"id"`
Chain int64 `json:"chain"`
Fee string `json:"fee"`
Hash string `json:"hash"`
Raw string `json:"raw"`
Signers []string `json:"signers"`
State string `json:"state"`
Error any `json:"error,omitempty"`
}
func ApproveTransaction ¶
func ReadTransaction ¶
func ReadTransaction(ctx context.Context, id string) (*Transaction, error)
Click to show internal directories.
Click to hide internal directories.