This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOT WORKING CODE - just a snippet to get the general idea | |
import { | |
identity, transferDeSoToken | |
} from "deso-protocol"; | |
try { | |
// Permission checks and setup | |
if (!identity.hasPermissions({ | |
TransactionCountLimitMap: { | |
NEW_MESSAGE: "UNLIMITED" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This only calculates the locked deso for now | |
''' | |
The DeSo GraphQL Queries: | |
Creator Coin Buys/Sells (you'll need the base64 publickey for that): https://graphql-prod.deso.com/?explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABAIq6EAUAJAGYCWeAziukQJKoA0RVAhjSnysAwjCYQ83WnQA2gvKwCCNGgiiCwABRgAjGXSgBpBAQBis%2BVIlh8AIQKsA2stXqEW3fqMnGAeTw2ePYAhAC6UlAQSGB0KHRRSipqGtp6BsYEwlExcVEAlETAADpIRGVE-K4pnuk%2BFPRyQjwNlkT0TCzNDMzc-PKsfAL43NZ2DjyjQQTckdGx8UgDszkLBcWl5WVIEDaMhSWbmyh4vEiMvOoL%2BxuH5SgAHkgAKgQADggHt3f3HDb3ALIIFC8MC8YGfL5EOKIZi8OCvCFfV41bwERG3B5IQHgm5fVQIABypwgjHR5QAvmSytCELD4WTKbiyq9eABzBAcGgQa6Q5BgUTiPBUogAC14jAJCHuKE0bI%2BTKIjM2SsVIE4IAAbrw8HReHpaRgQOsykUQO1mKbWABWAAMds4n1NfXwlqISBgMhkDo2ppaLowPPKpuRaVRruNh1NCBwvBkTwgrtNtmEAEYAJoAGVZrzwEBoAFUAEoAJgAysISBnbBBXgSkAAJABWAHYRVBTHACXQnsWAMwALS5ADY00gABoAUUMpag-cMmjoWhIOgA7mPTYjyd7NqbMS93uGyVGY3GEwGUynN9ugyBjqdzpcooeFbvHtjeM-IabZsC6GdP5CRCmpouYNAgqReBkiYgIorysjowj-JoQ4ANaaFgvg6Ioxb5v8KBwFAYAAOoAOKmAALIwAAijDRAAXgAUvWRH3HgrwAJzFihigAPRMBuCplCqyqbp8W6OiAkz2NBTxsP8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using https://github.com/deso-protocol/deso-js | |
////////////////////////////// | |
// Derived Key looks like this: | |
////////////////////////////// | |
if ( | |
!identity.hasPermissions({ | |
TransactionCountLimitMap: { | |
NEW_MESSAGE: "UNLIMITED" | |
}, | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
from requests.adapters import HTTPAdapter | |
from urllib3.util.retry import Retry | |
import time | |
# Get transactions and info on account: | |
# https://graphql-prod.deso.com/?explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABAIJRQQyoBCBAqgM75ICGiAFACQxN6uLoiAZRR4AlkgDmAQgCURYAB0kRIi3KUa9XvwTsezNgkHcdR%2BUpWqiABxgAjADZioAaQQEANMutEDfI28rVTAEBihxGxQxCCQg31CGCGoWRxYkKAQFH18ie1T0zIA5dIgGHNUAXwqicgBhCAkGAEkkOrE8WDTo2JKkMpqKCQAFcUyAETCIPoHg2rwEFhQIPBSGMQZhxtRyuYjF5bwGiRS0jLDsudVllFSGqhQa6r2FpZXjpFPCsJIGOtfDpdckQbndNI85s8EvgxAA3BBgdwEBhA3Kgxz3VBPQbbADqS3wcBYeAA1jNdtCkgAZaAkhHkmpgMRsWJgBgAJQQmThCNRvnRmIhvih1iZLKQbKEyBQfOsAvB2LmADMII5HBAAO74FGWYHyh6K3wqtWaiSSWXXCC3DEKyE1RwISTqAgAWTCDBYkjCnO58LAFpBVrBBrtcwdTqgrvdnrCUtQAf1WNDvmcdJ1NUt1sFhusiAYHq9HK5CB5-t1aKDNpDwpqeYLselCcr2eT1iQSpQ1DEbKbWdtNbm7ZQDF%2BVJYDBQAHkNUh8L3g0mB74hwxp7OyxnA33q9YRap-L8klBmT0kCOGAAVYlemXl-nN-u7mo2MooQ-QE8xM-zquLp9zA98w-JYv3PC88HSD0oEBO85QfHcqmfV90yuLcFyFf9%2BQgs91FPFDgX6RIA2ubCoNPC8CBsLJYIIoxN0Q1DVAkOxh3oogEAAD1EFhxiWFg2KVBAEAZRi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file has code for signing a transaction --> Credit: MiniGlome | |
import hashlib | |
import hmac | |
from typing import Union | |
from hashlib import sha256 | |
from secp256k1 import PrivateKey, PublicKey | |
import struct | |
class HmacDrbg: | |
def __init__(self, hash_len, q_byte_len): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################# | |
# | |
# Mass Diamond Shower Script | |
# by https://diamondapp.com/u/nathanwells | |
# | |
# Uses DeSo Python Library | |
# https://pypi.org/project/deso/ | |
# by https://diamondapp.com/u/ItsAditya | |
# | |
################################# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to mint DeSo NFTs from CSV file using ArWeave image storage | |
import arweave | |
import logging | |
from arweave.transaction_uploader import get_uploader, logger | |
import requests | |
from PIL import Image | |
import os, tempfile, zipfile | |
import csv | |
import shutil | |
import deso |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to download and convert NFT images from varies sources | |
import os | |
import csv | |
import requests | |
import shutil | |
from PIL import Image | |
# Create images directory if it doesn't exist | |
if not os.path.exists('./images'): | |
os.mkdir('./images') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jwt #pip install pyjwt | |
import os | |
import requests | |
import binascii | |
import json | |
from ecdsa import SigningKey, SECP256k1 | |
from io import BytesIO | |
''' SEEDHEX should always be kept private. It has access to your complete wallet. It's kinda like | |
seed phrase. This is why writing methods in backend isn't a good practice until we have derived keys. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jwt | |
import binascii | |
from ecdsa import SigningKey, SECP256k1 | |
''' SEEDHEX should always be kept private. It has access to your complete wallet. It's kinda like | |
seed phrase. This is why writing methods in backend isn't a good practice until we have derived keys. | |
You can only automate your own account and can't have user authorisation. It is recommended to use test account while using write methods. | |
You can find the seedHex of your account in your browser storage. Just open https://bitclout.com/ > Dev tools > Application > Storage > Local Storage > https://identity.bitclout.com > users > Select the public key with which you want to post > seedHex''' |
NewerOlder