Application#
- pydantic model empyrealSDK.types.Application[source]#
This represents an Application, which allows a builder to use the SDK.
Show JSON schema
{ "title": "Application", "description": "This represents an Application, which allows a builder to use the SDK.", "type": "object", "properties": { "id": { "format": "uuid", "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "type": { "title": "Type", "type": "string" }, "tier": { "title": "Tier", "type": "string" }, "apiKey": { "title": "Apikey", "type": "string" }, "swapFee": { "title": "Swapfee", "type": "integer" }, "feeCollectionAmount": { "title": "Feecollectionamount", "type": "integer" }, "requestCount": { "title": "Requestcount", "type": "integer" }, "owner": { "anyOf": [ { "$ref": "#/$defs/User" }, { "type": "null" } ] }, "appWallet": { "anyOf": [ { "$ref": "#/$defs/Wallet" }, { "type": "null" } ] } }, "$defs": { "User": { "description": "A User of an application. This is mainly used to organize wallets\nand actions to a single owner. Currently the telegram id identity is\nused to manage users, but they can be created without an originating\ntelegram account, and it is mainly used as a convenience for tracking.", "properties": { "id": { "format": "uuid", "title": "Id", "type": "string" }, "type": { "anyOf": [ { "$ref": "#/$defs/UserType" }, { "type": "null" } ], "default": null }, "name": { "title": "Name", "type": "string" }, "telegramId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Telegramid" }, "isNewUser": { "title": "Isnewuser", "type": "boolean" }, "metadata": { "default": {}, "title": "Metadata", "type": "object" } }, "required": [ "id", "name", "telegramId", "isNewUser" ], "title": "User", "type": "object" }, "UserType": { "enum": [ 1, 2 ], "title": "UserType", "type": "integer" }, "Wallet": { "description": "A wallet, which is able to make transactions.\n\nWallets are owned by a specific user, and have individual permissions.", "properties": { "id": { "format": "uuid", "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "address": { "title": "Address", "type": "string" }, "type": { "$ref": "#/$defs/WalletType" }, "groupId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Groupid" }, "ownerId": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "title": "Ownerid" }, "creatorAppId": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "title": "Creatorappid" }, "data": { "allOf": [ { "$ref": "#/$defs/WalletAppData" } ], "default": { "archived": false, "notes": {} } } }, "required": [ "id", "name", "address", "type", "groupId", "ownerId", "creatorAppId" ], "title": "Wallet", "type": "object" }, "WalletAppData": { "properties": { "archived": { "default": false, "title": "Archived", "type": "boolean" }, "notes": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "default": {}, "title": "Notes", "type": "object" } }, "title": "WalletAppData", "type": "object" }, "WalletType": { "enum": [ "mnemonic", "private_key", "enclave", "noncustodial" ], "title": "WalletType", "type": "string" } }, "required": [ "id", "name", "type", "tier", "apiKey", "swapFee", "feeCollectionAmount", "requestCount", "owner", "appWallet" ] }
- Fields:
api_key (str)
app_wallet (empyrealSDK.types.wallet.Wallet | None)
fee_collection_amount (int)
id (uuid.UUID)
name (str)
owner (empyrealSDK.types.user.User | None)
request_count (int)
swap_fee (int)
tier (str)
type (str)
- field api_key: str [Required] (alias 'apiKey')#
- field fee_collection_amount: int [Required] (alias 'feeCollectionAmount')#
- field id: UUID [Required]#
- field name: str [Required]#
- field request_count: int [Required] (alias 'requestCount')#
- field swap_fee: int [Required] (alias 'swapFee')#
- field tier: str [Required]#
- field type: str [Required]#
- async classmethod load(api_key: str | None = None)[source]#
Loads an instance of the current empyrealSDK user’s application. If an api_key is provided, this will create a new global client. Otherwise, the currently set application from the global context is loaded.
Token
empyrealSDK.types.Token
- async refresh_api_key()[source]#
Update your applications swap fee. Swap Fee must be set less than 2%.