Skip to content

Commit

Permalink
[authenticator] update open api
Browse files Browse the repository at this point in the history
  • Loading branch information
davidiw committed Oct 17, 2023
1 parent dabacb9 commit 88afb46
Show file tree
Hide file tree
Showing 18 changed files with 392 additions and 88 deletions.
192 changes: 166 additions & 26 deletions api/doc/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -11931,15 +11931,19 @@
"$ref": "#/components/schemas/AccountSignature_MultiEd25519Signature"
},
{
"$ref": "#/components/schemas/AccountSignature_Secp256k1EcdsaSignature"
"$ref": "#/components/schemas/AccountSignature_SingleKeySignature"
},
{
"$ref": "#/components/schemas/AccountSignature_MultiKeySignature"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"ed25519_signature": "#/components/schemas/AccountSignature_Ed25519Signature",
"multi_ed25519_signature": "#/components/schemas/AccountSignature_MultiEd25519Signature",
"secp256k1_ecdsa_signature": "#/components/schemas/AccountSignature_Secp256k1EcdsaSignature"
"single_key_signature": "#/components/schemas/AccountSignature_SingleKeySignature",
"multi_key_signature": "#/components/schemas/AccountSignature_MultiKeySignature"
}
}
},
Expand Down Expand Up @@ -11981,7 +11985,26 @@
}
]
},
"AccountSignature_Secp256k1EcdsaSignature": {
"AccountSignature_MultiKeySignature": {
"allOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"example": "multi_key_signature"
}
}
},
{
"$ref": "#/components/schemas/MultiKeySignature"
}
]
},
"AccountSignature_SingleKeySignature": {
"allOf": [
{
"type": "object",
Expand All @@ -11991,12 +12014,12 @@
"properties": {
"type": {
"type": "string",
"example": "secp256k1_ecdsa_signature"
"example": "single_key_signature"
}
}
},
{
"$ref": "#/components/schemas/Secp256k1EcdsaSignature"
"$ref": "#/components/schemas/SingleKeySignature"
}
]
},
Expand Down Expand Up @@ -12686,6 +12709,22 @@
}
}
},
"IndexedSignature": {
"type": "object",
"required": [
"index",
"signature"
],
"properties": {
"index": {
"type": "integer",
"format": "uint8"
},
"signature": {
"$ref": "#/components/schemas/Signature"
}
}
},
"ModuleBundlePayload": {
"type": "object",
"required": [
Expand Down Expand Up @@ -13081,6 +13120,33 @@
}
}
},
"MultiKeySignature": {
"type": "object",
"description": "A multi key signature",
"required": [
"public_keys",
"signatures",
"signatures_required"
],
"properties": {
"public_keys": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PublicKey"
}
},
"signatures": {
"type": "array",
"items": {
"$ref": "#/components/schemas/IndexedSignature"
}
},
"signatures_required": {
"type": "integer",
"format": "uint8"
}
}
},
"MultisigPayload": {
"type": "object",
"description": "A multisig transaction that allows an owner of a multisig account to execute a pre-approved\ntransaction as the multisig account.",
Expand Down Expand Up @@ -13143,6 +13209,43 @@
}
}
},
"PublicKey": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/PublicKey_string(HexEncodedBytes)"
},
{
"$ref": "#/components/schemas/PublicKey_string(HexEncodedBytes)"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"ed25519": "#/components/schemas/PublicKey_string(HexEncodedBytes)",
"secp256k1_ecdsa": "#/components/schemas/PublicKey_string(HexEncodedBytes)"
}
}
},
"PublicKey_string(HexEncodedBytes)": {
"allOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"example": "secp256k1_ecdsa"
}
}
},
{
"$ref": "#/components/schemas/HexEncodedBytes"
}
]
},
"RawTableItemRequest": {
"type": "object",
"description": "Table Item request for the GetTableItemRaw API",
Expand Down Expand Up @@ -13203,19 +13306,56 @@
}
}
},
"Secp256k1EcdsaSignature": {
"Signature": {
"type": "object",
"description": "A single Secp256k1Ecdsa signature",
"oneOf": [
{
"$ref": "#/components/schemas/Signature_string(HexEncodedBytes)"
},
{
"$ref": "#/components/schemas/Signature_string(HexEncodedBytes)"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"ed25519": "#/components/schemas/Signature_string(HexEncodedBytes)",
"secp256k1_ecdsa": "#/components/schemas/Signature_string(HexEncodedBytes)"
}
}
},
"Signature_string(HexEncodedBytes)": {
"allOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"example": "secp256k1_ecdsa"
}
}
},
{
"$ref": "#/components/schemas/HexEncodedBytes"
}
]
},
"SingleKeySignature": {
"type": "object",
"description": "A single key signature",
"required": [
"public_key",
"signature"
],
"properties": {
"public_key": {
"$ref": "#/components/schemas/HexEncodedBytes"
"$ref": "#/components/schemas/PublicKey"
},
"signature": {
"$ref": "#/components/schemas/HexEncodedBytes"
"$ref": "#/components/schemas/Signature"
}
}
},
Expand Down Expand Up @@ -13488,7 +13628,7 @@
"$ref": "#/components/schemas/TransactionSignature_FeePayerSignature"
},
{
"$ref": "#/components/schemas/TransactionSignature_Secp256k1EcdsaSignature"
"$ref": "#/components/schemas/TransactionSignature_AccountSignature"
}
],
"discriminator": {
Expand All @@ -13498,11 +13638,11 @@
"multi_ed25519_signature": "#/components/schemas/TransactionSignature_MultiEd25519Signature",
"multi_agent_signature": "#/components/schemas/TransactionSignature_MultiAgentSignature",
"fee_payer_signature": "#/components/schemas/TransactionSignature_FeePayerSignature",
"secp256k1_ecdsa_signature": "#/components/schemas/TransactionSignature_Secp256k1EcdsaSignature"
"single_sender": "#/components/schemas/TransactionSignature_AccountSignature"
}
}
},
"TransactionSignature_Ed25519Signature": {
"TransactionSignature_AccountSignature": {
"allOf": [
{
"type": "object",
Expand All @@ -13512,16 +13652,16 @@
"properties": {
"type": {
"type": "string",
"example": "ed25519_signature"
"example": "single_sender"
}
}
},
{
"$ref": "#/components/schemas/Ed25519Signature"
"$ref": "#/components/schemas/AccountSignature"
}
]
},
"TransactionSignature_FeePayerSignature": {
"TransactionSignature_Ed25519Signature": {
"allOf": [
{
"type": "object",
Expand All @@ -13531,16 +13671,16 @@
"properties": {
"type": {
"type": "string",
"example": "fee_payer_signature"
"example": "ed25519_signature"
}
}
},
{
"$ref": "#/components/schemas/FeePayerSignature"
"$ref": "#/components/schemas/Ed25519Signature"
}
]
},
"TransactionSignature_MultiAgentSignature": {
"TransactionSignature_FeePayerSignature": {
"allOf": [
{
"type": "object",
Expand All @@ -13550,16 +13690,16 @@
"properties": {
"type": {
"type": "string",
"example": "multi_agent_signature"
"example": "fee_payer_signature"
}
}
},
{
"$ref": "#/components/schemas/MultiAgentSignature"
"$ref": "#/components/schemas/FeePayerSignature"
}
]
},
"TransactionSignature_MultiEd25519Signature": {
"TransactionSignature_MultiAgentSignature": {
"allOf": [
{
"type": "object",
Expand All @@ -13569,16 +13709,16 @@
"properties": {
"type": {
"type": "string",
"example": "multi_ed25519_signature"
"example": "multi_agent_signature"
}
}
},
{
"$ref": "#/components/schemas/MultiEd25519Signature"
"$ref": "#/components/schemas/MultiAgentSignature"
}
]
},
"TransactionSignature_Secp256k1EcdsaSignature": {
"TransactionSignature_MultiEd25519Signature": {
"allOf": [
{
"type": "object",
Expand All @@ -13588,12 +13728,12 @@
"properties": {
"type": {
"type": "string",
"example": "secp256k1_ecdsa_signature"
"example": "multi_ed25519_signature"
}
}
},
{
"$ref": "#/components/schemas/Secp256k1EcdsaSignature"
"$ref": "#/components/schemas/MultiEd25519Signature"
}
]
},
Expand Down
Loading

0 comments on commit 88afb46

Please sign in to comment.