Avalanche Francophone
  • Documentation du développeur
  • Apprendre
    • Aperçu de la plateforme
      • Staking
      • Frais de transaction
    • Les bases de la blockchain
    • FAQ
    • Forum
    • Communauté
  • Créer
  • Pour commencer: exécuter un nœud Avalanche
  • Notes de version
    • Alertes par email
    • Notes de mise à jour d'AvalancheGo
    • Notes de mise à jour d'Ortelius
  • Tutoriels
    • Plateforme
      • Créer une nouvelle blockchain
      • Créer un Réseau Local Testnet
      • Créer un sous-réseau (subnet)
      • Créer une Machine Virtuelle (VM)
      • Configurez votre Ledger Nano S avec Avalanche
      • Transférer de l'AVAX entre la X-Chain et la C-Chain
      • Transférer de l'AVAX entre la X-Chain et la P-Chain
    • Nœuds et mise en jeu
      • Ajouter un validateur
      • Maintenir un nœud Avalanche
      • Exécutez un nœud Avalanche et devenez validateur
      • Exécuter un nœud Avalanche avec Oracle VM VirtualBox
      • Exécutez un nœud Avalanche avec un Raspberry Pi 4
      • Exécutez un nœud Avalanche et faites une mise en jeu avec le portefeuille
      • Exécuter un nœud Avalanche avec OVH
      • Exécuter un nœud Avalanche avec Amazon Web Services (AWS)
      • Exécuter un nœud Avalanche avec Microsoft Azure
      • Exécuter un nœud Avalanche sous Linux à l'aide du script d'installation
      • Configuration du monitoring des nœuds
      • Mise en jeu d'AVAX, en validant ou délégant via le portefeuille Avalanche
      • Déléguer à un nœud
      • Sécurisation d'un serveur VPS
      • Mettez à niveau votre nœud AvalancheGo
    • Contrats intelligents
      • Déployer un contrat intelligent en utilisant Remix et MetaMask
      • Utilisation de Truffle avec la C-Chain d'Avalanche
    • Actifs Numériques Intelligents
      • Créer un token ERC-20
      • Créer un actif à capitalisation fixe
      • Créer un actif à capitalisation variable
      • Création d'un NFT - Partie 1
      • Créez des NFT avec le portefeuille Avalanche
      • Utilisez les Wrapped AVAX (WAVAX) sur Avalanche
  • AvalancheGo APIs
    • Émettre des appels d'API
    • Platform API (P-Chain)
    • EVM API (C-Chain)
    • AVM API (X-Chain)
    • Appels d'API obsolètes
    • API Admin
    • API Auth
    • API Health
    • API Info
    • API IPC
    • API Keystore
    • API Metrics
    • API Timestamp
  • Outils
    • AvalancheJS
      • Créer un actif sur la X-Chain
      • Management des clés sur la X-Chain
      • Envoyer un actif sur la X-Chain
      • API
    • Avash
    • Ortelius
  • Références
    • AVM Transaction Format
    • Command Line Interface
    • Coreth Atomic Transaction Format
    • Cryptographic Primitives
    • Network Protocol
    • Serialization Primitives
    • Platform Transaction Format
  • Papiers
Propulsé par GitBook
Sur cette page
  • Format
  • Endpoint
  • API Méthodes
  • info.getBlockchainID
  • info.getNetworkID
  • info.getNetworkName
  • info.getNodeID
  • info.getNodeVersion
  • info.isBootstrapped
  • info.peers
  • info.getTxFee

Cet article vous a-t-il été utile ?

  1. AvalancheGo APIs

API Info

Cette API peut être utilisée pour accéder aux informations de base sur le nœud.

PrécédentAPI HealthSuivantAPI IPC

Dernière mise à jour il y a 4 ans

Cet article vous a-t-il été utile ?

Format

Cette API utilise le format RPC json 2.0. Pour plus d'informations sur les appels JSON RPC, cliquez .

Endpoint

/ext/info

API Méthodes

info.getBlockchainID

Étant donné l'alias d'une blockchain, obtenez son identifiant. (Voir pour plus de contexte.)

Signature

info.getBlockchainID({alias:string}) -> {blockchainID:string}

Exemple d'un Appel

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.getBlockchainID",
    "params": {
        "alias":"X"
    }
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Exemple de Réponse

{
    "jsonrpc":"2.0",
    "id"     :1,
    "result" :{
        "blockchainID":"sV6o671RtkGBcno1FiaDbVcFv2sG5aVXMZYzKdP4VQAWmJQnM"
    }
}

info.getNetworkID

Obtenez l'ID du réseau auquel ce nœud participe.

Signature

info.getNetworkID() -> {networkID:int}

Exemple d'un Appel

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.getNetworkID"
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Exemple de Réponse

{
    "jsonrpc":"2.0",
    "id"     :1,
    "result" :{
        "networkID":"2"
    }
}

info.getNetworkName

Obtenez le nom du réseau auquel ce nœud participe.

Signature

info.getNetworkName() -> {networkName:string}

Exemple d'un Appel

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.getNetworkName"
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Exemple de Réponse

{
    "jsonrpc":"2.0",
    "id"     :1,
    "result" :{
        "networkName":"local"
    }
}

info.getNodeID

Obenir l'Id du nœud

Signature

info.getNodeID() -> {nodeID: string}

Exemple d'un Appel

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.getNodeID"
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Exemple de Réponse

{
    "jsonrpc": "2.0",
    "result": {
        "nodeID": "NodeID-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD"
    },
    "id": 1
}

info.getNodeVersion

Obenir la version du nœud.

Signature

info.getNodeVersion() -> {version: string}

Exemple d'un Appel

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.getNodeVersion"
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Exemple de Réponse

{
    "jsonrpc": "2.0",
    "result": {
        "version": "avalanche/0.5.7"
    },
    "id": 1
}

info.isBootstrapped

Vérifiez si une chaîne donnée a terminé le boostraping

Signature

info.isBootstrapped(chain: string) -> {isBootstrapped: bool}
  • chain est l'ID ou l'alias de la chaîne..

Exemple d'un Appel

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.isBootstrapped",
    "params": {
        "chain":"X"
    }
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Exemple de Réponse

{
    "jsonrpc": "2.0",
    "result": {
        "isBootstrapped": true
    },
    "id": 1
}

info.peers

Obtenir une description des connexions de vos pairs.

Signature

info.peers() -> {peers:[]{
    ip: string,
    publicIP: string,
    nodeID: string,
    version: string,
    lastSent: string,
    lastRecevied: string
}}

Exemple d'un Appel

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.peers"
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Exemple de Réponse

{
    "jsonrpc":"2.0",
    "id"     :1,
    "result" :{
        "peers":[
          {
             "ip":"206.189.137.87:9651",
             "publicIP":"206.189.137.87:9651",
             "nodeID":"NodeID-8PYXX47kqLDe2wD4oPbvRRchcnSzMA4J4",
             "version":"avalanche/0.5.0",
             "lastSent":"2020-06-01T15:23:02Z",
             "lastReceived":"2020-06-01T15:22:57Z"
          },
          {
             "ip":"158.255.67.151:9651",
             "publicIP":"158.255.67.151:9651",
             "nodeID":"NodeID-C14fr1n8EYNKyDfYixJ3rxSAVqTY3a8BP",
             "version":"avalanche/0.5.0",
             "lastSent":"2020-06-01T15:23:02Z",
             "lastReceived":"2020-06-01T15:22:34Z"
          },
          {
             "ip":"83.42.13.44:9651",
             "publicIP":"83.42.13.44:9651",
             "nodeID":"NodeID-LPbcSMGJ4yocxYxvS2kBJ6umWeeFbctYZ",
             "version":"avalanche/0.5.0",
             "lastSent":"2020-06-01T15:23:02Z",
             "lastReceived":"2020-06-01T15:22:55Z"
          }
        ]
    }
}

info.getTxFee

Obtenez les frais de transaction du réseau.

Signature

info.getTxFee() -> {txFee:uint64}

Exemple d'un Appel

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.getTxFee"
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Exemple de Réponse

{
    "jsonrpc":"2.0",
    "id"     :1,
    "result" :{
        "txFee": "1000000"
    }
}
ici
admin.aliasChain