alchemy

package
v0.0.0-...-702b61e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlchemyResult

type AlchemyResult struct {
	Result AlchemyTransfers
}

Sample result:

{
 "jsonrpc": "2.0",
 "id": 0,
 "result": {
   "transfers": [
     {
       "blockNum": "0x3c5dc2",
       "uniqueId": "0xe80924bdd25694c272eebbfb5f1566c26dcca4c79260124e5b2a10c9872a41c3:external",
       "hash": "0xe80924bdd25694c272eebbfb5f1566c26dcca4c79260124e5b2a10c9872a41c3",
       "from": "0x12e59115191d91e6e901645cfc8b7686bb7c7dfe",
       "to": "0x08d2b0a37f869ff76bacb5bab3278e26ab7067b7",
       "value": 0.02,
       "erc721TokenId": null,
       "erc1155Metadata": null,
       "tokenId": null,
       "asset": "ETH",
       "category": "external",
       "rawContract": {
         "value": "0x470de4df820000",
         "address": null,
         "decimal": "0x12"
       }
     }
   ]
 }
}

type AlchemyTransaction

type AlchemyTransaction struct {
	Hash     string
	From     string
	To       string
	Value    float32
	BlockNum string
}

type AlchemyTransfers

type AlchemyTransfers struct {
	Transfers []*AlchemyTransaction
}

type Transfer

type Transfer struct {
	Type        string `json:"type"`
	Source      string `json:"source"`
	Destination string `json:"destination"`
	Amount      string `json:"amount"`
	Hash        string `json:"hash"`
	Block       int64  `json:"block"`
}

func TransactionHistory

func TransactionHistory(address string) ([]*Transfer, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL