Skip to content

Instantly share code, notes, and snippets.

@zcstarr
Created April 29, 2021 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zcstarr/92324295aad99a04f2263f27fecf3ed5 to your computer and use it in GitHub Desktop.
Save zcstarr/92324295aad99a04f2263f27fecf3ed5 to your computer and use it in GitHub Desktop.
Near Keystore Json Configuration Schema
{
"$id": "near-keystore-config-schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Near JSON Keystore Configuration",
"type": "object",
"$ref": "#/definitions/jsonKeystoreConfig",
"definitions": {
"jsonKeystoreConfig": {
"title": "jsonKeystoreConfig",
"type": "object",
"properties": {
"mainnet": {
"$ref": "#/definitions/keyConfigs"
},
"testnet": {
"$ref": "#/definitions/keyConfigs"
}
},
"additionalProperties": {
"$ref": "#/definitions/keyConfigs"
},
"$comment": "keys are assumed to be the networkId"
},
"keyConfigs": {
"type": "array",
"items": {
"$ref": "#/definitions/keyConfig"
}
},
"keyConfig" : {
"title": "keyConfig",
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/account_id"
},
"public_key": {
"$ref": "#/definitions/public_key"
},
"private_key": {
"$ref": "#/definitions/private_key"
}
}
},
"account_id": {
"title": "account_id",
"type": "string",
"pattern": "^(([a-z0-9]+[\\-_])*[a-z0-9]+\\.)*([a-z0-9]+[\\-_])*[a-z0-9]+$",
"minLength": 2,
"maxLength": 64
},
"public_key": {
"title": "public_key",
"type": "string",
"pattern": "^ed25519:[a-zA-Z0-9]+$"
},
"private_key": {
"title": "private_key",
"type": "string",
"pattern": "^ed25519:[a-zA-Z0-9]+$"
}
}
}
{
"mainnet": [
{
"account_id": "foobar.near",
"private_key": "ed25519:asdfasdfXAwfeafafwaef",
"public_key": "ed25519:asdfasdfXAwfeafafwaefbobbyB33FXawfaw33faf3f3a3"
},
{
"account_id": "baz.near",
"private_key": "ed25519:KxTsdfasdfXAwfeafafwaef",
"public_key": "ed25519:ZsdfasdfXAwfeafafwaefbobbyB33FXawfaw33faf3f3a3"
}
],
"testnet": [
{
"account_id": "foobar.testnet",
"private_key": "ed25519:asdfasdfXAwfeafafwaef",
"public_key": "ed25519:asdfasdfXAwfeafafwaefbobbyB33FXawfaw33faf3f3a3"
}
],
"customlocal": [
{
"account_id": "foobar.customlocal",
"private_key": "ed25519:asdfasdfXAwfeafafwaef",
"public_key": "ed25519:asdfasdfXAwfeafafwaefbobbyB33FXawfaw33faf3f3a3"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment