@civic/sol-did-idl
Version:
The official Solana IDL for did:sol
265 lines (264 loc) • 8 kB
TypeScript
/**
* Program IDL in camelCase format in order to be used in JS/TS.
*
* Note that this is only a type helper and is not the actual IDL. The original
* IDL can be found at `target/idl/example.json`.
*/
export type Example = {
"address": "exCJEJeiWNbq13aZaaYVyeWXQ5hjj3r6fn4GtceoR9f";
"metadata": {
"name": "example";
"version": "0.1.0";
"spec": "0.1.0";
"description": "Created with Anchor";
};
"instructions": [
{
"name": "addService";
"discriminator": [
133,
207,
106,
32,
91,
111,
153,
30
];
"accounts": [
{
"name": "didData";
"writable": true;
},
{
"name": "authority";
"signer": true;
},
{
"name": "solDidProgram";
"address": "didso1Dpqpm4CsiCjzP766BGY89CAdD6ZBL68cRhFPc";
}
];
"args": [
{
"name": "fragment";
"type": "string";
},
{
"name": "serviceType";
"type": "string";
},
{
"name": "serviceEndpoint";
"type": "string";
}
];
},
{
"name": "initialize";
"discriminator": [
175,
175,
109,
31,
13,
152,
155,
237
];
"accounts": [
{
"name": "didData";
"writable": true;
},
{
"name": "authority";
"writable": true;
"signer": true;
},
{
"name": "payer";
"writable": true;
"signer": true;
},
{
"name": "systemProgram";
"address": "11111111111111111111111111111111";
},
{
"name": "solDidProgram";
"address": "didso1Dpqpm4CsiCjzP766BGY89CAdD6ZBL68cRhFPc";
}
];
"args": [
{
"name": "size";
"type": "u32";
}
];
}
];
"accounts": [
{
"name": "didAccount";
"discriminator": [
77,
88,
239,
141,
251,
29,
237,
243
];
}
];
"types": [
{
"name": "didAccount";
"type": {
"kind": "struct";
"fields": [
{
"name": "version";
"docs": [
"Version identifier"
];
"type": "u8";
},
{
"name": "bump";
"docs": [
"Bump"
];
"type": "u8";
},
{
"name": "nonce";
"docs": [
"Nonce, for protecting against replay attacks around secp256k1 signatures."
];
"type": "u64";
},
{
"name": "initialVerificationMethod";
"docs": [
"The initial authority key, automatically being added to the array of all Verification Methods."
];
"type": {
"defined": {
"name": "verificationMethod";
};
};
},
{
"name": "verificationMethods";
"docs": [
"All verification methods"
];
"type": {
"vec": {
"defined": {
"name": "verificationMethod";
};
};
};
},
{
"name": "services";
"docs": [
"Services"
];
"type": {
"vec": {
"defined": {
"name": "service";
};
};
};
},
{
"name": "nativeControllers";
"docs": [
"Controller (native) - did:sol:<controller>"
];
"type": {
"vec": "pubkey";
};
},
{
"name": "otherControllers";
"docs": [
"Controller (others) - all others"
];
"type": {
"vec": "string";
};
}
];
};
},
{
"name": "service";
"docs": [
"A Service Definition [`DidAccount`]"
];
"type": {
"kind": "struct";
"fields": [
{
"name": "fragment";
"type": "string";
},
{
"name": "serviceType";
"type": "string";
},
{
"name": "serviceEndpoint";
"type": "string";
}
];
};
},
{
"name": "verificationMethod";
"docs": [
"The native authority key for a [`DidAccount`]"
];
"type": {
"kind": "struct";
"fields": [
{
"name": "fragment";
"docs": [
"fragment"
];
"type": "string";
},
{
"name": "flags";
"docs": [
"The permissions this key has"
];
"type": "u16";
},
{
"name": "methodType";
"docs": [
"The actual verification method"
];
"type": "u8";
},
{
"name": "keyData";
"docs": [
"Dynamically sized key matching the given VerificationType"
];
"type": "bytes";
}
];
};
}
];
};